com.ibm.task.api

Class TaskError

  1. java.lang.Object
  2. extended byjava.lang.Throwable
  3. extended byjava.lang.Exception
  4. extended byjava.lang.RuntimeException
  5. extended bycom.ibm.task.api.TaskError
All implemented interfaces:
java.io.Serializable
Direct known subclasses:
StateObserverError

  1. public class TaskError
  2. extends java.lang.RuntimeException
This class is the base class for all Human Task Manager runtime exceptions. Exceptions can include nested exceptions.
Since:
6.0
See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
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)
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
  1. java.lang.Throwable
getCause()
This method returns the nested exception.
  1. java.lang.String
getMessage()
This method returns the message text stored in this instance.
  1. java.lang.String
getMessage(java.util.Locale parLocale)
This method returns the message text stored in this instancet.
  1. java.lang.String
getMessageID()
This method returns the message id.
  1. java.lang.String
getMessageKey()
This method returns the message key.
  1. java.lang.Object[]
getMessageVariables()
This method returns the values of message variables.
  1. java.lang.Throwable
getRootCause()
This method returns the root exception of this error.
  1. void
printStackTrace()
This method prints this exception to the standard error stream.
  1. void
printStackTrace(java.io.PrintStream parPrintStream)
This method prints this exception to the specified print stream.
  1. void
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

  1. public static final java.lang.String COPYRIGHT
See Also:

Constructor Detail

TaskError

  1. public TaskError(java.lang.String parMessage)
This constructor creates an error object using the passed message.
Parameters:
parMessage - error message

TaskError

  1. public TaskError(java.lang.Exception parExcpt)
This constructor creates an error object using the passed exception.
Parameters:
parExcpt - exception that has caused the error

TaskError

  1. public TaskError(java.lang.String parMessage,
  2. java.lang.Throwable parExcpt)
This constructor creates an error object using the passed message and exception.
Parameters:
parMessage - error message
parExcpt - exception that has caused the error

TaskError

  1. public TaskError(java.lang.String parKey,
  2. java.lang.Object[] parVarArr,
  3. java.lang.String parID)
This constructor creates an error object using the passed message key and the passed message variables (as array).

The error message can thus localize the cause of the error.

Note: If the passed variable array contains objects, they must be serializable.

Parameters:
parKey - message key
parVarArr - message variables array (can be empty)
parID - message id

TaskError

  1. public TaskError(java.lang.String parKey,
  2. java.lang.Object[] parVarArr,
  3. java.lang.String parID,
  4. java.lang.Throwable parExcpt)
This constructor creates an error object using the passed message key, the passed message variables (as array) and the exception.

The error message can thus localize the cause of the error.

Parameters:
parKey - message key
parVarArr - message variables array (can be empty)
parID - message id
parExcpt - exception that has caused the error

TaskError

  1. public TaskError(java.lang.String parKey,
  2. java.lang.Object[] parVarArr)
Deprecated. Use TaskError(String, Object[], String) instead.
This constructor creates an error object using the passed message key and the passed message variables (as array).

The error message can thus localize the cause of the error.

Note: If the passed variable array contains objects, they must be serializable.

Parameters:
parKey - message key
parVarArr - message variables array (can be empty)

TaskError

  1. public TaskError(java.lang.String parKey,
  2. java.lang.Object[] parVarArr,
  3. java.lang.Throwable parExcpt)
This constructor creates an error object using the passed message key, the passed message variables (as array) and the exception.

The error message can thus localize the cause of the error.

Parameters:
parKey - message key
parVarArr - message variables array (can be empty)
parExcpt - exception that has caused the error

Method Detail

getMessage

  1. public final java.lang.String getMessage( )
This method returns the message text stored in this instance.

Note: The message text is returned in the default language.

Overrides:
getMessage in class java.lang.Throwable
Returns:
message text.

getMessage

  1. public final java.lang.String getMessage( java.util.Locale parLocale)
This method returns the message text stored in this instancet. If the instance contains a message key, the message text is returned in the specified language.

Note: The local 'parLocale' is ignored if the instance doesn't contain a message key.

Parameters:
parLocale - locale of the message catalog to be used.
Returns:
message text.

getMessageKey

  1. public final java.lang.String getMessageKey( )
This method returns the message key.

Note: If a message key is not specified null is returned.

Returns:
message key.

getMessageID

  1. public final java.lang.String getMessageID( )
This method returns the message id.

Note: If a message id is not specified null is returned.

Returns:
message id.

getMessageVariables

  1. public final java.lang.Object[] getMessageVariables( )
This method returns the values of message variables.

Note: If there a no variable values, null is returned.

Returns:
array of variable values

getCause

  1. public final java.lang.Throwable getCause( )
This method returns the nested exception.

Note: If there a no nested exception, null is returned.

Overrides:
getCause in class java.lang.Throwable
Returns:
nested exception

getRootCause

  1. public final java.lang.Throwable getRootCause( )
This method returns the root exception of this error.
Returns:
root exception.

printStackTrace

  1. public final void printStackTrace( )
This method prints this exception to the standard error stream. This call is forwarded to printStackTrace(PrintWriter).
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

  1. public final void printStackTrace( java.io.PrintStream parPrintStream)
This method prints this exception to the specified print stream. This call is forwarded to printStackTrace(PrintWriter).
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
parPrintStream - print stream to write to

printStackTrace

  1. public final void printStackTrace( java.io.PrintWriter parPrintWriter)
This method prints this exception to the specified print writer. If this exception has nested exceptions, the root exception's stack trace is printed.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
parPrintWriter - print writer to write to