public class EngineRuntimeException
extends java.lang.RuntimeException
implements java.io.Externalizable
ExceptionCode
objects. EngineRuntimeException
supports use of an error stack, as well as exception chaining (constructing a chain of exceptions by wrapping
additional exceptions). You can use getAsErrorStack
to do a stack trace of either the
error stack or the exception chain.ExceptionCode
,
ErrorStack
,
Serialized FormConstructor and Description |
---|
EngineRuntimeException()
This constructor exists for the implementation of the Externalizable
interface.
|
EngineRuntimeException(EngineRuntimeException cause,
com.filenet.apiimpl.exception.ExceptionContext ctx,
java.lang.Object[] ctxArgs)
(FileNet internal use only)
Specifies
EngineRuntimeException cause, exception code, and context. |
EngineRuntimeException(ErrorStack errStack)
Use this to implement an error stack, specifying the
ErrorStack object to use for this instance. |
EngineRuntimeException(ExceptionCode code)
Use this to specify only the
ExceptionCode object for this exception. |
EngineRuntimeException(ExceptionCode code,
java.lang.Object codeArg0)
Use this to specify the
ExceptionCode object and the specific value in use (code argument) when
the error occurred for this exception. |
EngineRuntimeException(ExceptionCode code,
java.lang.Object[] codeArgs)
Use this to specify the
ExceptionCode object and an array of specific values (code arguments) in use
when the error occurred for this exception. |
EngineRuntimeException(ExceptionCode code,
java.lang.Object[] codeArgs,
com.filenet.apiimpl.exception.ExceptionContext ctx,
java.lang.Object[] ctxArgs)
(FileNet internal use only)
Specifies exception code and context.
|
EngineRuntimeException(ExceptionCode code,
java.lang.Object[] codeArgs,
com.filenet.apiimpl.exception.ExceptionContext ctx,
java.lang.Object[] ctxArgs,
com.filenet.apiimpl.exception.ExceptionContext addlCtx,
java.lang.Object[] addlCtxArgs)
(FileNet internal use only)
Specifies exception code and context.
|
EngineRuntimeException(ExceptionCode code,
java.lang.Object codeArg0,
com.filenet.apiimpl.exception.ExceptionContext ctx,
java.lang.Object[] ctxArgs)
Use this to specify the
ExceptionCode object and the specific value in use (code argument) when
the error occurred for this exception. |
EngineRuntimeException(java.lang.Throwable cause,
ExceptionCode code,
java.lang.Object[] codeArgs)
Use this for exception chaining.
|
EngineRuntimeException(java.lang.Throwable cause,
ExceptionCode code,
java.lang.Object[] codeArgs,
com.filenet.apiimpl.exception.ExceptionContext ctx,
java.lang.Object[] ctxArgs)
(FileNet internal use only)
Specifies Throwable cause, exception code, and context.
|
Modifier and Type | Method and Description |
---|---|
ErrorStack |
getAsErrorStack()
Returns the error stack, if an error stack is used; otherwise this instance is returned as an
ErrorStack
object. |
ExceptionCode |
getExceptionCode()
Gets the
ExceptionCode object specified for this instance. |
java.lang.String |
getLocalizedMessage()
Gets a localized version of the description string (using the default locale) specified in the
ExceptionCode
object used for this instance. |
java.lang.String |
getMessage()
Gets a localized version of the description string (using the default locale) specified in the
ExceptionCode
object used for this instance. |
static java.lang.Throwable |
mergeStackTraces(java.lang.Throwable current,
java.lang.Throwable backGround)
Merges the stack trace elements from two threads and returns it as a single stack trace.
|
void |
readExternal(java.io.ObjectInput s)
Reads this instance from the underlying stream and stores it in the error stack.
|
java.lang.String |
toString()
Returns a description of this exception.
|
void |
writeExternal(java.io.ObjectOutput s)
Writes this instance to the underlying stream.
|
public EngineRuntimeException()
public EngineRuntimeException(ErrorStack errStack)
ErrorStack
object to use for this instance. If
unspecified, an error stack is not used.errStack
- An ErrorStack
object to use.public EngineRuntimeException(ExceptionCode code, java.lang.Object[] codeArgs)
ExceptionCode
object and an array of specific values (code arguments) in use
when the error occurred for this exception.code
- The ExceptionCode
object to use.codeArgs
- An Object
array containing the code arguments. This can be null.public EngineRuntimeException(ExceptionCode code)
ExceptionCode
object for this exception.code
- The ExceptionCode
object to use.public EngineRuntimeException(ExceptionCode code, java.lang.Object codeArg0)
ExceptionCode
object and the specific value in use (code argument) when
the error occurred for this exception.code
- The ExceptionCode
object to use.codeArg0
- An Object
containing the code argument. This can be null.public EngineRuntimeException(ExceptionCode code, java.lang.Object codeArg0, com.filenet.apiimpl.exception.ExceptionContext ctx, java.lang.Object[] ctxArgs)
ExceptionCode
object and the specific value in use (code argument) when
the error occurred for this exception.code
- The ExceptionCode
object to use.codeArg0
- An Object
containing the code argument. This can be null.ctx
- Used to localize the context message.ctxArgs
- An Object
array containing the context arguments.public EngineRuntimeException(java.lang.Throwable cause, ExceptionCode code, java.lang.Object[] codeArgs)
ExceptionCode
object and an array of specific values (code
arguments) in use when the error occurred for this (wrapping) exception. The Throwable
object
specified is wrapped (nested) within this exception.cause
- A java.lang.Throwable
object containing the exception to wrap.code
- The ExceptionCode
object to use.codeArgs
- An Object
array containing the code arguments. This can be null.public EngineRuntimeException(ExceptionCode code, java.lang.Object[] codeArgs, com.filenet.apiimpl.exception.ExceptionContext ctx, java.lang.Object[] ctxArgs)
code
- The ExceptionCode
object to use.codeArgs
- An Object
array containing the code arguments.ctx
- Used to localize the context message.ctxArgs
- An Object
array containing the context arguments.public EngineRuntimeException(ExceptionCode code, java.lang.Object[] codeArgs, com.filenet.apiimpl.exception.ExceptionContext ctx, java.lang.Object[] ctxArgs, com.filenet.apiimpl.exception.ExceptionContext addlCtx, java.lang.Object[] addlCtxArgs)
code
- The ExceptionCode
object to use.codeArgs
- An Object
array containing the code arguments.ctx
- Used to localize the context message.ctxArgs
- An Object
array containing the context arguments.addlCtx
- Used to localize the additional context message.addlCtxArgs
- An Object
array containing the additional context arguments.public EngineRuntimeException(java.lang.Throwable cause, ExceptionCode code, java.lang.Object[] codeArgs, com.filenet.apiimpl.exception.ExceptionContext ctx, java.lang.Object[] ctxArgs)
cause
- A java.lang.Throwable
object containing the exception to wrap.code
- The ExceptionCode
object to use.codeArgs
- An Object
array containing the code arguments.ctx
- Used to localize context message.ctxArgs
- An Object
array containing the context arguments.public EngineRuntimeException(EngineRuntimeException cause, com.filenet.apiimpl.exception.ExceptionContext ctx, java.lang.Object[] ctxArgs)
EngineRuntimeException
cause, exception code, and context.cause
- An EngineRuntimeException
containing the exception to wrap. The exception code and its
argument array are retrieved from this object.ctx
- Used to localize context message.ctxArgs
- An Object
array containing the context arguments.public ExceptionCode getExceptionCode()
ExceptionCode
object specified for this instance.ExceptionCode
object for this exception.public java.lang.String getMessage()
ExceptionCode
object used for this instance. This method overrides java.lang.Throwable.getMessage
.getMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage()
ExceptionCode
object used for this instance. This method overrides java.lang.Throwable.getLocalizedMessage
.getLocalizedMessage
in class java.lang.Throwable
public ErrorStack getAsErrorStack()
ErrorStack
object. The stack can contain an exception chain (if the instance was created using
EngineRuntimeException(Throwable, ExceptionCode, Object[])
.ErrorStack
object containing an exception or exceptions from either the error stack or
this instance.public java.lang.String toString()
toString
in class java.lang.Throwable
String
representation of this exception.public void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
s
- A java.io.ObjectOutput object representing this instance.java.io.IOException
- if an IO error occurs.public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
s
- A java.io.ObjectInput object representing this instance.java.io.IOException
- if an IO error occurs, or the class cannot be found.java.lang.ClassNotFoundException
public static java.lang.Throwable mergeStackTraces(java.lang.Throwable current, java.lang.Throwable backGround)
current
- A java.lang.Throwable
object containing the stack trace elements for the current
thread.backGround
- A java.lang.Throwable
object containing the stack trace elements for the
background thread.java.lang.Throwable
object containing the merged stack trace elements.© Copyright IBM Corporation 2006, 2015. All rights reserved.