com.ibm.commerce.exception
Class ECException

java.lang.Object
  |
  +--CommandException
        |
        +--com.ibm.commerce.exception.ECException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ECApplicationException, ECSystemException

public abstract class ECException
extends CommandException
implements java.io.Serializable

ECException is the abstract base class used for defining exceptions thrown by the WebSphere Commerce Application Server.

See Also:
Serialized Form

Field Summary
static java.lang.String APPLICATION_ERROR
          Default value of the application error parameter.
static java.lang.String ECMESSAGE
          Default value of the message parameter.
static java.lang.String ECMESSAGEKEY
          Default value of the message key parameter.
protected  TypedProperty errorProperties
           
static java.lang.String EXCEP_DATA
          Default value of the exception data parameter.
static java.lang.String EXCEP_TYPE
          Default value of the exception type parameter.
static java.lang.String EXCEPTION
          Default value of the exception parameter.
static java.lang.String GENERIC_APPLICATION_ERROR_TASK
          Default value of the generic application error task parameter.
static java.lang.String GENERIC_SYSTEM_ERROR_TASK
          Default value of the generic application error task parameter.
static java.lang.String MSG_PARAM
          Default value of the message parameter.
static java.lang.String SYSTEM_ERROR
          Default value of the system error task parameter.
 
Constructor Summary
ECException()
          Constructor for ECException with an ECMessage object.
ECException(ECMessage msg)
          Constructor for ECException with an ECMessage object.
ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam)
          Constructor for ECApplicationException with an ECMessage object.
ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, boolean logMessage)
          Constructor for ECApplicationException with an ECMessage object.
ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, java.lang.String errorTaskName)
          Constructor for ECApplicationException with an ECMessage object.
ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, java.lang.String errorTaskName, boolean logMsg)
          Constructor for ECApplicationException with an ECMessage object.
ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.String errorTaskName)
          Constructor for ECApplicationException with an ECMessage object.
ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.String errorTaskName, boolean logMessage)
          Constructs for ECApplicationException with an ECMessage object.
ECException(java.lang.String message)
          Constructor for ECException with an ECMessage object.
 
Method Summary
 java.lang.String getErrorMessageKey()
          Gets the error message key.
  TypedProperty getErrorProperties()
          Gets the sets of error parameters.
 java.lang.String getErrorTaskName()
          Gets the error task name.
abstract  java.lang.String getErrorType()
          Gets the type of error.
abstract  java.lang.String getGenericErrorTask()
          Gets the generic error task
 java.lang.String getMessageKey()
          Gets the error message key.
static java.lang.String getStackTrace(java.lang.Throwable exc)
          Gets the Stack Trace as a String.
 java.lang.Throwable getThrowable()
          Gets the ECException object associated with this exception.
 java.lang.String getUserMessage(java.util.Locale loc)
          Gets the user message.
protected  void logMessage(ECMessage msg, java.lang.String className, java.lang.String methodName)
          Logs a message.
protected  void logMessage(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam)
          Logs a message.
protected  void logMessage(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, java.lang.Throwable throwable)
          Log a message.
 void setErrorTaskName(java.lang.String viewtask)
          Sets the error view task name for this exception.
 void setException(java.lang.Throwable exc)
          Sets the Exception object associated with this exception.
 void setOrginatingCommand(java.lang.String value)
          Sets the name of the command which throws this exception.
 void setThrowable(java.lang.Throwable exc)
          Sets the Exception object associated with this exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERIC_APPLICATION_ERROR_TASK

public static final java.lang.String GENERIC_APPLICATION_ERROR_TASK
Default value of the generic application error task parameter.
See Also:
Constant Field Values

GENERIC_SYSTEM_ERROR_TASK

public static final java.lang.String GENERIC_SYSTEM_ERROR_TASK
Default value of the generic application error task parameter.
See Also:
Constant Field Values

EXCEP_TYPE

public static final java.lang.String EXCEP_TYPE
Default value of the exception type parameter.
See Also:
Constant Field Values

EXCEP_DATA

public static final java.lang.String EXCEP_DATA
Default value of the exception data parameter.
See Also:
Constant Field Values

MSG_PARAM

public static final java.lang.String MSG_PARAM
Default value of the message parameter.
See Also:
Constant Field Values

ECMESSAGE

public static final java.lang.String ECMESSAGE
Default value of the message parameter.
See Also:
Constant Field Values

ECMESSAGEKEY

public static final java.lang.String ECMESSAGEKEY
Default value of the message key parameter.
See Also:
Constant Field Values

EXCEPTION

public static final java.lang.String EXCEPTION
Default value of the exception parameter.
See Also:
Constant Field Values

APPLICATION_ERROR

public static final java.lang.String APPLICATION_ERROR
Default value of the application error parameter.
See Also:
Constant Field Values

SYSTEM_ERROR

public static final java.lang.String SYSTEM_ERROR
Default value of the system error task parameter.
See Also:
Constant Field Values

errorProperties

protected TypedProperty errorProperties
Constructor Detail

ECException

public ECException()
Constructor for ECException with an ECMessage object.

ECException

public ECException(ECMessage msg)
Constructor for ECException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception

ECException

public ECException(ECMessage msg,
                   java.lang.String className,
                   java.lang.String methodName,
                   java.lang.Object[] msgParam)
Constructor for ECApplicationException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECApplicationException
methodName - the name of the method that threw this ECApplicationException
msgParam - an array of parameter values to be passed to the message

ECException

public ECException(ECMessage msg,
                   java.lang.String className,
                   java.lang.String methodName,
                   java.lang.Object[] msgParam,
                   java.lang.String errorTaskName)
Constructor for ECApplicationException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECApplicationException
methodName - the name of the method that threw this ECApplicationException
msgParam - an array of parameter values to be passed to the message
errorTaskName - the name of the exception handler to handle this message

ECException

public ECException(ECMessage msg,
                   java.lang.String className,
                   java.lang.String methodName,
                   java.lang.String errorTaskName)
Constructor for ECApplicationException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECApplicationException
methodName - the name of the method that threw this ECApplicationException
errorTaskName - the name of the exception handler to handle this message

ECException

public ECException(java.lang.String message)
Constructor for ECException with an ECMessage object.
Parameters:
message - the string used for describing the exception

ECException

public ECException(ECMessage msg,
                   java.lang.String className,
                   java.lang.String methodName,
                   java.lang.Object[] msgParam,
                   boolean logMessage)
Constructor for ECApplicationException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECApplicationException
methodName - the name of the method that threw this ECApplicationException
msgParam - an array of parameter values to be passed to the message
logMessage - true if an error message is logged immediately

ECException

public ECException(ECMessage msg,
                   java.lang.String className,
                   java.lang.String methodName,
                   java.lang.Object[] msgParam,
                   java.lang.String errorTaskName,
                   boolean logMsg)
Constructor for ECApplicationException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECApplicationException
methodName - the name of the method that threw this ECApplicationException
msgParam - an array of parameter values to be passed to the message
errorTaskName - the name of the exception handler to handle this message

ECException

public ECException(ECMessage msg,
                   java.lang.String className,
                   java.lang.String methodName,
                   java.lang.String errorTaskName,
                   boolean logMessage)
Constructs for ECApplicationException with an ECMessage object.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECApplicationException
methodName - the name of the method that threw this ECApplicationException
errorTaskName - the name of the exception handler to handle this message
logMessage - true if an error message is logged immediately
Method Detail

getErrorMessageKey

public java.lang.String getErrorMessageKey()
Gets the error message key.
Returns:
the error message key

getErrorProperties

public TypedProperty getErrorProperties()
Gets the sets of error parameters.
Returns:
the nvp of all the error properties

getErrorTaskName

public java.lang.String getErrorTaskName()
Gets the error task name.
Returns:
the error task name

getErrorType

public abstract java.lang.String getErrorType()
Gets the type of error.
Returns:
the error type

getGenericErrorTask

public abstract java.lang.String getGenericErrorTask()
Gets the generic error task
Returns:
(java.lang.String) The generic error task.

getMessageKey

public java.lang.String getMessageKey()
Gets the error message key.
Returns:
the error message key

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable exc)
Gets the Stack Trace as a String.
Parameters:
exc - the Throwable object

getThrowable

public java.lang.Throwable getThrowable()
Gets the ECException object associated with this exception.
Returns:
the ECException object.

getUserMessage

public java.lang.String getUserMessage(java.util.Locale loc)
Gets the user message.
Returns:
the user message

logMessage

protected void logMessage(ECMessage msg,
                          java.lang.String className,
                          java.lang.String methodName)
Logs a message.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECException
methodName - the name of the method that threw this ECException

logMessage

protected void logMessage(ECMessage msg,
                          java.lang.String className,
                          java.lang.String methodName,
                          java.lang.Object[] msgParam)
Logs a message.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECException
methodName - the name of the method that threw this ECException
msgParam - array of object to be passed as parameters to the message

logMessage

protected void logMessage(ECMessage msg,
                          java.lang.String className,
                          java.lang.String methodName,
                          java.lang.Object[] msgParam,
                          java.lang.Throwable throwable)
Log a message.
Parameters:
msg - the ECMessage object used for describing the exception
className - the name of the class that threw this ECException
methodName - the name of the method that threw this ECException
msgParam - array of object to be passed as parameters to the message
throwable - the Throwable object

setErrorTaskName

public void setErrorTaskName(java.lang.String viewtask)
Sets the error view task name for this exception.
Parameters:
viewtask - name of the error view task

setException

public void setException(java.lang.Throwable exc)
Sets the Exception object associated with this exception.
Parameters:
exc - the Throwable object

setOrginatingCommand

public void setOrginatingCommand(java.lang.String value)
Sets the name of the command which throws this exception.
Parameters:
value - The name of the command.

setThrowable

public void setThrowable(java.lang.Throwable exc)
Sets the Exception object associated with this exception.
Parameters:
exc - The Throwable object.