IBM WebSphere Application ServerTM
Release 7

com.ibm.task.api
Class TaskError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.ibm.task.api.TaskError
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
StateObserverError

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

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

TaskError

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

Parameters:
parMessage - error message

TaskError

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

public TaskError(java.lang.String parMessage,
                 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

public 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).

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

public 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.

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

public TaskError(java.lang.String parKey,
                 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

public TaskError(java.lang.String parKey,
                 java.lang.Object[] parVarArr,
                 java.lang.Throwable parExcpt)
Deprecated. Use TaskError(String, Object[], String, Throwable) instead.

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

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

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

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

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

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

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

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

Returns:
root exception.

printStackTrace

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

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

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

IBM WebSphere Application ServerTM
Release 7