com.filenet.api.exception
Class ErrorStack
- java.lang.Object
-
- com.filenet.api.exception.ErrorStack
-
- All Implemented Interfaces:
- java.io.Serializable
public class ErrorStack extends java.lang.Object implements java.io.SerializableContains a collection ofErrorRecordinstances returned by the server. Each instance in the collection corresponds to an exception that was chained and returned by the server. Chained exceptions are placed in anErrorStackobject and stored in anEngineRuntimeExceptionobject.- See Also:
EngineRuntimeException,ErrorRecord, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ErrorStack(EngineRuntimeException ere)Creates anErrorStackinstance from anEngineRuntimeExceptionobject.ErrorStack(java.lang.String errorName, ErrorRecord[] recs)Creates theErrorStackinstance by explicitly specifying theErrorRecordobject that the error stack is to contain.
-
Method Summary
Methods Modifier and Type Method and Description ErrorRecord[]getErrorRecords()Returns allErrorRecordinstances stored in this error stack.ExceptionCodegetExceptionCode()Gets theExceptionCodeobject for the current exception.java.lang.StringgetMessage()Gets the localized error text of the first ErrorRecord object in this error stack.java.lang.StringtoString()Returns aStringrepresentation of all records in this error stack.
-
-
-
Constructor Detail
-
ErrorStack
public ErrorStack(EngineRuntimeException ere)
Creates anErrorStackinstance from anEngineRuntimeExceptionobject. Each exception that is chained in theEngineRuntimeExceptionobject becomes anErrorRecordobject stored in theErrorStackinstance.- Parameters:
ere- AnEngineRuntimeExceptionobject containing the exception or chain of exceptions to add to the stack.
-
ErrorStack
public ErrorStack(java.lang.String errorName, ErrorRecord[] recs)Creates theErrorStackinstance by explicitly specifying theErrorRecordobject that the error stack is to contain.- Parameters:
errorName- AStringcontaining the name to assign to the error stack. If null, this defaults toExceptionCode.E_SERVER_ERROR.recs- AnErrorRecordarray containing the exceptions.
-
-
Method Detail
-
getErrorRecords
public ErrorRecord[] getErrorRecords()
Returns allErrorRecordinstances stored in this error stack.- Returns:
- An
ErrorRecordarray containing all exceptions on the stack.
-
getExceptionCode
public ExceptionCode getExceptionCode()
Gets theExceptionCodeobject for the current exception.- Returns:
- An
ExceptionCodeobject for this exception.
-
getMessage
public java.lang.String getMessage()
Gets the localized error text of the first ErrorRecord object in this error stack.- Returns:
- A
Stringcontaining the exception description for this exception.
-
toString
public java.lang.String toString()
Returns aStringrepresentation of all records in this error stack.- Overrides:
toStringin classjava.lang.Object- Returns:
- A
Stringrepresenting all of the records in this error stack.
-
-