com.ibm.task.api
Class TaskError
- java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ibm.task.api.TaskError
- public class TaskError
- extends java.lang.RuntimeException
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Constructor Summary
Constructor and Description |
---|
TaskError(java.lang.Exception parExcpt)
This constructor creates an error object using the passed exception.
|
TaskError(java.lang.String parMessage)
This constructor creates an error object using the passed message.
|
TaskError(java.lang.String parKey,java.lang.Object[] parVarArr)
Deprecated. Use
TaskError(String, Object[], String) instead.
|
TaskError(java.lang.String parKey,java.lang.Object[] parVarArr,java.lang.String parID)
This constructor creates an error object using the passed message key
and the passed message variables (as array).
|
TaskError(java.lang.String parKey,java.lang.Object[] parVarArr,java.lang.String parID,java.lang.Throwable parExcpt)
This constructor creates an error object using the passed message key,
the passed message variables (as array) and the exception.
|
TaskError(java.lang.String parKey,java.lang.Object[] parVarArr,java.lang.Throwable parExcpt)
Deprecated. Use
TaskError(String, Object[], String, Throwable) instead.
|
TaskError(java.lang.String parMessage,java.lang.Throwable parExcpt)
This constructor creates an error object using the passed message and
exception.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getCause()
This method returns the nested exception.
|
|
getMessage()
This method returns the message text stored in this instance.
|
|
getMessage(java.util.Locale parLocale)
This method returns the message text stored in this instancet.
|
|
getMessageID()
This method returns the message id.
|
|
getMessageKey()
This method returns the message key.
|
|
getMessageVariables()
This method returns the values of message variables.
|
|
getRootCause()
This method returns the root exception of this error.
|
|
printStackTrace()
This method prints this exception to the standard error stream.
|
|
printStackTrace(java.io.PrintStream parPrintStream)
This method prints this exception to the specified print stream.
|
|
printStackTrace(java.io.PrintWriter parPrintWriter)
This method prints this exception to the specified print writer.
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
Constructor Detail
TaskError
- public TaskError(java.lang.String parMessage)
parMessage
- error message TaskError
- public TaskError(java.lang.Exception parExcpt)
parExcpt
- exception that has caused the error TaskError
- public TaskError(java.lang.String parMessage,
- java.lang.Throwable parExcpt)
parMessage
- error message parExcpt
- exception that has caused the error TaskError
- public TaskError(java.lang.String parKey,
- java.lang.Object[] parVarArr,
- java.lang.String parID)
The error message can thus localize the cause of the error.
Note: If the passed variable array contains objects, they must be serializable.
parKey
- message key parVarArr
- message variables array (can be empty) parID
- message id TaskError
- public TaskError(java.lang.String parKey,
- java.lang.Object[] parVarArr,
- java.lang.String parID,
- java.lang.Throwable parExcpt)
The error message can thus localize the cause of the error.
parKey
- message key parVarArr
- message variables array (can be empty) parID
- message id parExcpt
- exception that has caused the error TaskError
- public TaskError(java.lang.String parKey,
- java.lang.Object[] parVarArr)
TaskError(String, Object[], String)
instead.
The error message can thus localize the cause of the error.
Note: If the passed variable array contains objects, they must be serializable.
parKey
- message key parVarArr
- message variables array (can be empty) TaskError
- public TaskError(java.lang.String parKey,
- java.lang.Object[] parVarArr,
- java.lang.Throwable parExcpt)
TaskError(String, Object[], String, Throwable)
instead.
The error message can thus localize the cause of the error.
parKey
- message key parVarArr
- message variables array (can be empty) parExcpt
- exception that has caused the error Method Detail
getMessage
- public final java.lang.String getMessage( )
Note: The message text is returned in the default language.
getMessage
in class java.lang.Throwable
getMessage
- public final java.lang.String getMessage( java.util.Locale parLocale)
Note: The local 'parLocale' is ignored if the instance doesn't contain a message key.
parLocale
- locale of the message catalog to be used. getMessageKey
- public final java.lang.String getMessageKey( )
Note: If a message key is not specified null
is returned.
getMessageID
- public final java.lang.String getMessageID( )
Note: If a message id is not specified null
is returned.
getMessageVariables
- public final java.lang.Object[] getMessageVariables( )
Note: If there a no variable values, null
is returned.
getCause
- public final java.lang.Throwable getCause( )
Note: If there a no nested exception, null
is returned.
getCause
in class java.lang.Throwable
getRootCause
- public final java.lang.Throwable getRootCause( )
printStackTrace
- public final void printStackTrace( )
printStackTrace(PrintWriter)
.
printStackTrace
in class java.lang.Throwable
printStackTrace
- public final void printStackTrace( java.io.PrintStream parPrintStream)
printStackTrace(PrintWriter)
.
printStackTrace
in class java.lang.Throwable
parPrintStream
- print stream to write to printStackTrace
- public final void printStackTrace( java.io.PrintWriter parPrintWriter)
printStackTrace
in class java.lang.Throwable
parPrintWriter
- print writer to write to