public class ErrorStack
extends java.lang.Object
implements java.io.Serializable
ErrorRecord
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 an
ErrorStack
object and stored in an EngineRuntimeException
object.EngineRuntimeException
,
ErrorRecord
,
Serialized FormConstructor and Description |
---|
ErrorStack(EngineRuntimeException ere)
Creates an
ErrorStack instance from an EngineRuntimeException object. |
ErrorStack(java.lang.String errorName,
ErrorRecord[] recs)
Creates the
ErrorStack instance by explicitly specifying the ErrorRecord object that
the error stack is to contain. |
Modifier and Type | Method and Description |
---|---|
ErrorRecord[] |
getErrorRecords()
Returns all
ErrorRecord instances stored in this error stack. |
ExceptionCode |
getExceptionCode()
Gets the
ExceptionCode 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 a
String representation of all records in this error stack. |
public ErrorStack(EngineRuntimeException ere)
ErrorStack
instance from an EngineRuntimeException
object. Each exception
that is chained in the EngineRuntimeException
object becomes an ErrorRecord
object
stored in the ErrorStack
instance.ere
- An EngineRuntimeException
object containing the exception or chain of exceptions to
add to the stack.public ErrorStack(java.lang.String errorName, ErrorRecord[] recs)
ErrorStack
instance by explicitly specifying the ErrorRecord
object that
the error stack is to contain.errorName
- A String
containing the name to assign to the error stack. If null, this defaults to
ExceptionCode.E_SERVER_ERROR
.recs
- An ErrorRecord
array containing the exceptions.public ErrorRecord[] getErrorRecords()
ErrorRecord
instances stored in this error stack.ErrorRecord
array containing all exceptions on the stack.public ExceptionCode getExceptionCode()
ExceptionCode
object for the current exception.ExceptionCode
object for this exception.public java.lang.String getMessage()
String
containing the exception description for this exception.public java.lang.String toString()
String
representation of all records in this error stack.toString
in class java.lang.Object
String
representing all of the records in this error stack.© Copyright IBM Corporation 2006, 2015. All rights reserved.