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.Serializable
Contains a collection ofErrorRecord
instances 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 anErrorStack
object and stored in anEngineRuntimeException
object.- See Also:
EngineRuntimeException
,ErrorRecord
, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ErrorStack(EngineRuntimeException ere)
Creates anErrorStack
instance from anEngineRuntimeException
object.ErrorStack(java.lang.String errorName, ErrorRecord[] recs)
Creates theErrorStack
instance by explicitly specifying theErrorRecord
object that the error stack is to contain.
-
Method Summary
Methods Modifier and Type Method and Description ErrorRecord[]
getErrorRecords()
Returns allErrorRecord
instances stored in this error stack.ExceptionCode
getExceptionCode()
Gets theExceptionCode
object for the current exception.java.lang.String
getMessage()
Gets the localized error text of the first ErrorRecord object in this error stack.java.lang.String
toString()
Returns aString
representation of all records in this error stack.
-
-
-
Constructor Detail
-
ErrorStack
public ErrorStack(EngineRuntimeException ere)
Creates anErrorStack
instance from anEngineRuntimeException
object. Each exception that is chained in theEngineRuntimeException
object becomes anErrorRecord
object stored in theErrorStack
instance.- Parameters:
ere
- AnEngineRuntimeException
object containing the exception or chain of exceptions to add to the stack.
-
ErrorStack
public ErrorStack(java.lang.String errorName, ErrorRecord[] recs)
Creates theErrorStack
instance by explicitly specifying theErrorRecord
object that the error stack is to contain.- Parameters:
errorName
- AString
containing the name to assign to the error stack. If null, this defaults toExceptionCode.E_SERVER_ERROR
.recs
- AnErrorRecord
array containing the exceptions.
-
-
Method Detail
-
getErrorRecords
public ErrorRecord[] getErrorRecords()
Returns allErrorRecord
instances stored in this error stack.- Returns:
- An
ErrorRecord
array containing all exceptions on the stack.
-
getExceptionCode
public ExceptionCode getExceptionCode()
Gets theExceptionCode
object for the current exception.- Returns:
- An
ExceptionCode
object 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
String
containing the exception description for this exception.
-
toString
public java.lang.String toString()
Returns aString
representation of all records in this error stack.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A
String
representing all of the records in this error stack.
-
-