com.filenet.api.exception
Class ErrorRecord
- java.lang.Object
-
- com.filenet.api.exception.ErrorRecord
-
- All Implemented Interfaces:
- java.io.Serializable
public class ErrorRecord extends java.lang.Object implements java.io.Serializable
Represents a single exception that has occurred on the server. When the server returns an exception to the client it converts each chained exception into an ErrorRecord object and places it in an error stack (ErrorStack
).- See Also:
ErrorStack
,EngineRuntimeException
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
DIAGNOSTIC_EXCEPTION_CODE
When the exception is anEngineRuntimeException
instance, this field identifies the exception code.static java.lang.String
DIAGNOSTIC_FAILED_BATCH_ITEM
When an UpdatingBatch fails, this diagnostic item contains a zero-based integer value indicating which item in the UpdatingBatch failed.static java.lang.String
DIAGNOSTIC_STACK_TRACE
Identifies the stack trace information for the exception.
-
Constructor Summary
Constructors Constructor and Description ErrorRecord(java.lang.String source, java.lang.String description, java.util.HashMap diagnosticTypes)
Use this to create a record from exception data.ErrorRecord(java.lang.Throwable erte)
Use this to create a record for any exception.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getDescription()
Gets the description string for the exception.java.util.HashMap
getDiagnosticTypes()
Returns the key and associated value describing the specific details required to troubleshoot the exception.java.lang.String
getSource()
Gets the name of the exception instance that occurred.java.lang.String
toString()
Returns the details of the exception.
-
-
-
Field Detail
-
DIAGNOSTIC_STACK_TRACE
public static final java.lang.String DIAGNOSTIC_STACK_TRACE
Identifies the stack trace information for the exception. This field is used bygetDiagnosticTypes
andtoString
.- See Also:
- Constant Field Values
-
DIAGNOSTIC_EXCEPTION_CODE
public static final java.lang.String DIAGNOSTIC_EXCEPTION_CODE
When the exception is anEngineRuntimeException
instance, this field identifies the exception code. This field is used bygetDiagnosticTypes
andtoString
.- See Also:
- Constant Field Values
-
DIAGNOSTIC_FAILED_BATCH_ITEM
public static final java.lang.String DIAGNOSTIC_FAILED_BATCH_ITEM
When an UpdatingBatch fails, this diagnostic item contains a zero-based integer value indicating which item in the UpdatingBatch failed. This is used internally by the API to link the exception to appropriate BatchItemHandle. This field is used bygetDiagnosticTypes
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ErrorRecord
public ErrorRecord(java.lang.Throwable erte)
Use this to create a record for any exception. This can be anEngineRuntimeException
instance cast as aThrowable
object.- Parameters:
erte
- Ajava.lang.Throwable
object for either the exception, or theEngineRuntimeException
instance.
-
ErrorRecord
public ErrorRecord(java.lang.String source, java.lang.String description, java.util.HashMap diagnosticTypes)
Use this to create a record from exception data.- Parameters:
source
- AString
containing the name of the exception instance that occurred.description
- AString
containing a description of the exception.diagnosticTypes
- AHashMap
object containing the exception code string, and a string containing the stack trace information (fromjava.lang.Throwable.getStackTrace
) for this exception.
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Gets the description string for the exception.- Returns:
- A
String
containing the exception description. For an EngineRuntimeException instance, the text is localized to the client locale (either the default locale of the client JVM or the locale that has been set in the UserContext object).
-
getSource
public java.lang.String getSource()
Gets the name of the exception instance that occurred.- Returns:
- A
String
containing the instance name of the exception.
-
getDiagnosticTypes
public java.util.HashMap getDiagnosticTypes()
Returns the key and associated value describing the specific details required to troubleshoot the exception. For an EngineRuntimeException, this generally includes the specific exception code and stack trace of where the problem occurred.- Returns:
- A
HashMap
object containing the exception code string, and a string containing the stack trace information (fromjava.lang.Throwable.getStackTrace
) for this exception.
-
toString
public java.lang.String toString()
Returns the details of the exception. The result is the concatenation of the following:- The name of the exception's class
- The name of the exception code
- The exception's error message
- The exception's stack trace
- Overrides:
toString
in classjava.lang.Object
- Returns:
- A
String
representation of the exception.
-
-