filenet.vw.api
Class VWException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- filenet.vw.api.VWException
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- VWServerException
public class VWException extends java.lang.RuntimeException implements java.io.SerializableThis is the base class for all workflow exceptions. Use this class to access the resource strings an application uses to create the exceptions.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description VWException(java.lang.String aKey, java.lang.String dummy)ConstructorVWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object arg0)ConstructorVWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object[] arguments)ConstructorVWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object arg0, java.lang.Object arg1)ConstructorVWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)ConstructorVWException(java.lang.Throwable cause)Constructor
-
Method Summary
Methods Modifier and Type Method and Description static java.lang.StringDescribeThrowableAndItsCause(java.lang.Throwable t)static java.lang.StringDescribeThrowableAndItsCauseWithStackFrames(java.lang.Throwable t, int maxFrames)static java.lang.StringDescribeThrowableCompletely(java.lang.Throwable t)java.lang.StringgetCauseClassName()Returns the class name for the cause of this VWException.java.lang.StringgetCauseDescription()Returns the description for the cause of this VWException.java.lang.StringgetKey()Retrieves the key to an exception.java.lang.StringgetLocalizedMessage()Retrieves the localized version of an exception message.java.lang.StringgetMessage()Retrieves the associated string from the exceptions resource file.static java.lang.ThrowablegetRealCause(java.lang.Throwable t)java.lang.ThrowablegetRootCause()Returns the root cause of this VWException ornullif the cause is nonexistent or unknown.static java.lang.StringgetStringFromKey(java.lang.String theKey)Retrieves the string in the exceptions resource file that corresponds to the exception key.voidsetCause(java.lang.Throwable cause)Initializes the cause of this VWException to the specified value.voidsetIncludeRootCause(boolean bInclude)Set to false to exclude the root cause from the error message.java.lang.StringtoString()Retrieves the associated string from the exceptions resource file.static java.lang.StringtupleToSWGFormatMessageCode(int tuple)Convert error tuple to an SWG message format standard message code.
-
-
-
Constructor Detail
-
VWException
public VWException(java.lang.Throwable cause)
Constructor- Parameters:
cause- The causing exception that is being wrapped by this VWException.
-
VWException
public VWException(java.lang.String aKey, java.lang.String dummy)Constructor- Parameters:
aKey- Key to use in looking up a resource in the VWExceptions file; an identifier of the form "vw.<package>.<id>" (e.g., vw.server.exception1)dummy- English version of resource string the application uses to generate the VWExceptions file
-
VWException
public VWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object arg0)Constructor- Parameters:
aKey- A String containing the key to use in looking up the specified resource string.dummy- A String containing the English version of the resource string the application uses to generate the VWException file.arg0- An Object referencing the first argument to apply when formatting the resource string.
-
VWException
public VWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object arg0, java.lang.Object arg1)Constructor- Parameters:
aKey- A String containing the key to use in looking up the specified resource string.dummy- A String containing the English version of the resource string the application uses to generate the VWException file.arg0- An Object referencing the first argument to apply when formatting the resource string.arg1- An Object referencing the second argument to apply when formatting the resource string.
-
VWException
public VWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)Constructor- Parameters:
aKey- A String containing the key to use in looking up the specified resource string.dummy- A String containing the English version of the resource string the application uses to generate the VWException file.arg0- An Object referencing the first argument to apply when formatting the resource string.arg1- An Object referencing the second argument to apply when formatting the resource string.arg2- An Object referencing the third argument to apply when formatting the resource string.
-
VWException
public VWException(java.lang.String aKey, java.lang.String dummy, java.lang.Object[] arguments)Constructor- Parameters:
aKey- A String containing the key to use in looking up the specified resource string.dummy- A String containing the English version of the resource string the application uses to generate the VWException file.arguments- An Object array containing a variable number of arguments to use in generating a string from a resource template string.
-
-
Method Detail
-
setCause
public void setCause(java.lang.Throwable cause)
Initializes the cause of this VWException to the specified value. (The cause is the throwable that caused this VWException to get thrown.) This method can be called at most once. It is generally called immediately after creating the VWException. If this VWException was created with VWException(Throwable), this method cannot be called even once.- Parameters:
cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). A null value is permitted, and indicates that the cause is nonexistent or unknown.
-
getRootCause
public java.lang.Throwable getRootCause()
Returns the root cause of this VWException ornullif the cause is nonexistent or unknown. (The root cause is the last exception in the exception chain.)- Returns:
- The root cause of this throwable or
nullif the cause is nonexistent or unknown.
-
getCauseClassName
public java.lang.String getCauseClassName()
Returns the class name for the cause of this VWException.- Returns:
- The class name for the cause of this VWException or
nullif the cause is nonexistent or unknown.
-
getCauseDescription
public java.lang.String getCauseDescription()
Returns the description for the cause of this VWException.- Returns:
- The description for the cause of this VWException or
nullif the cause is nonexistent or unknown.
-
toString
public java.lang.String toString()
Retrieves the associated string from the exceptions resource file.- Overrides:
toStringin classjava.lang.Throwable- Returns:
- A string representing the exception file's associated string, if the string is available; otherwise the method returns the default value for the exception key.
- See Also:
VWException.getStringFromKey( String ),VWException.getKey()
-
getMessage
public java.lang.String getMessage()
Retrieves the associated string from the exceptions resource file.- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- A string representing the exception file's associated string, if the string is available; otherwise the method returns the default value for the exception key.
- See Also:
VWException.getStringFromKey( String )
-
getKey
public java.lang.String getKey()
Retrieves the key to an exception.- Returns:
- The key to an exception.
-
getStringFromKey
public static java.lang.String getStringFromKey(java.lang.String theKey)
Retrieves the string in the exceptions resource file that corresponds to the exception key.- Returns:
- The string that corresponds to the resource key, as defined in the exceptions resource file.
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
Retrieves the localized version of an exception message.- Overrides:
getLocalizedMessagein classjava.lang.Throwable- Returns:
- The localized version of an exception message.
-
getRealCause
public static java.lang.Throwable getRealCause(java.lang.Throwable t)
-
DescribeThrowableAndItsCause
public static java.lang.String DescribeThrowableAndItsCause(java.lang.Throwable t)
-
DescribeThrowableCompletely
public static java.lang.String DescribeThrowableCompletely(java.lang.Throwable t)
-
DescribeThrowableAndItsCauseWithStackFrames
public static java.lang.String DescribeThrowableAndItsCauseWithStackFrames(java.lang.Throwable t, int maxFrames)
-
tupleToSWGFormatMessageCode
public static java.lang.String tupleToSWGFormatMessageCode(int tuple)
Convert error tuple to an SWG message format standard message code.- Returns:
- the SWG message code equivalent of the error tuple.
- Since:
- PE 5.2.0.0
-
setIncludeRootCause
public void setIncludeRootCause(boolean bInclude)
Set to false to exclude the root cause from the error message.- Parameters:
bInclude-- Since:
- PE 5.2.0.0
-
-