public abstract class ECException
extends com.ibm.websphere.command.CommandException
implements java.io.Serializable, com.ibm.commerce.exception.ECCorrelatedIdentity
Modifier and Type | Field and Description |
---|---|
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.
|
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 and Description |
---|
ECException()
This is the default constructor for this class.
|
ECException(ECMessage msg)
This is a constructor for this class with one parameter.
|
ECException(ECMessage msg,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] msgParam)
This is a constructor for this class with three parameters.
|
ECException(ECMessage msg,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] msgParam,
boolean logMessage)
This is a constructor for this class with five parameters.
|
ECException(ECMessage msg,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] msgParam,
java.lang.String errorTaskName)
This is a constructor for this class with five parameters.
|
ECException(ECMessage msg,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] msgParam,
java.lang.String errorTaskName,
boolean logMsg)
This is a constructor for this class with six parameters.
|
ECException(ECMessage msg,
java.lang.String className,
java.lang.String methodName,
java.lang.String errorTaskName)
This is a constructor for this class with four parameters.
|
ECException(ECMessage msg,
java.lang.String className,
java.lang.String methodName,
java.lang.String errorTaskName,
boolean logMessage)
This is a constructor for this class with five parameters.
|
ECException(java.lang.String message)
This is a constructor for this class with one parameter.
|
Modifier and Type | Method and Description |
---|---|
void |
addLogData(java.util.Map logData)
This method adds additional data for logging the exception.
|
void |
addLogData(java.lang.String name,
java.lang.Object value)
This method adds additional data for logging the exception.
|
java.lang.String |
getCorrelationIdentifier()
This method returns the correlation identifier for the exception.
|
ECMessage |
getECMessage()
This method returns an
ECMessage object associated with the
exception. |
ECParameterError[] |
getECParameterErrors()
This method returns the
ECParameterError objects associated
with the exception. |
java.lang.String |
getErrorMessageKey()
This method gets the error message key.
|
TypedProperty |
getErrorProperties()
This method gets a set of error parameters.
|
java.lang.String |
getErrorTaskName()
This method gets the error task name.
|
abstract java.lang.String |
getErrorType()
This method gets the type of error.
|
abstract java.lang.String |
getGenericErrorTask()
This method gets the generic error task.
|
java.lang.String |
getMessage()
This method returns the localized message of the exception.
|
java.lang.String |
getMessageKey()
This method gets the error message key.
|
java.lang.Object[] |
getMessageParameters()
This method returns the message parameters.
|
static java.lang.String |
getStackTrace(java.lang.Throwable exc)
This method gets the stack trace as a
String object. |
java.lang.String[] |
getSymptomData()
This method returns the symptom data.
|
java.lang.Throwable |
getThrowable()
This method gets the
ECException object associated with this
exception. |
java.lang.String |
getUserMessage(java.util.Locale loc)
This method gets the user message.
|
boolean |
isRecoverable()
This method determines whether the exception is recoverable.
|
void |
printStackTrace(java.io.PrintStream output)
This method prints a stack trace and includes the correlation identifier
and log data with the stack trace.
|
void |
printStackTrace(java.io.PrintWriter output)
This method prints the stack trace and includes the correlation
identifier and log data with the stack trace.
|
void |
setErrorTaskName(java.lang.String viewtask)
This method sets the error view task name for this exception.
|
void |
setException(java.lang.Throwable exc)
This method sets the
Exception object associated with this
exception. |
void |
setOrginatingCommand(java.lang.String value)
This method sets the name of the command that throws this exception.
|
void |
setRecoverable(boolean recoverable)
This method sets whether the exception is recoverable.
|
void |
setThrowable(java.lang.Throwable exc)
This method sets the
Exception object associated with this
exception. |
getException, getExceptionInfo, getOriginalException, getPreviousException, printStackTrace, printSuperStackTrace, printSuperStackTrace, setDefaultMessage, setLocalizationInfo
public static final java.lang.String GENERIC_APPLICATION_ERROR_TASK
public static final java.lang.String GENERIC_SYSTEM_ERROR_TASK
public static final java.lang.String EXCEP_TYPE
public static final java.lang.String EXCEP_DATA
public static final java.lang.String MSG_PARAM
public static final java.lang.String ECMESSAGE
public static final java.lang.String ECMESSAGEKEY
public static final java.lang.String EXCEPTION
public static final java.lang.String APPLICATION_ERROR
public static final java.lang.String SYSTEM_ERROR
public ECException()
public ECException(java.lang.String message)
message
- The String
used for describing the exception.public ECException(ECMessage msg)
msg
- An ECMessage
object used for describing the
exception.public ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam)
msg
- An 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 Object
array of parameter values to be passed
to the message.public ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, java.lang.String errorTaskName)
msg
- An 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 Object
array of parameter values to be passed
to the message.errorTaskName
- The name of the exception handler to handle this message.public ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.String errorTaskName)
msg
- An 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.public ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, boolean logMessage)
msg
- An 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 Object
array of parameter values to be passed
to the message.logMessage
- A boolean
value representing whether an error
message is logged immediately (true if it is, false
otherwise).public ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.String errorTaskName, boolean logMessage)
msg
- An 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
- A boolean
value representing whether an error
message is logged immediately (true if it is, false
otherwise).public ECException(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] msgParam, java.lang.String errorTaskName, boolean logMsg)
msg
- An 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 Object
array of parameter values to be passed
to the message.errorTaskName
- The name of the exception handler to handle this message.logMessage
- A boolean
value representing whether an error
message is logged immediately (true if it is, false
otherwise).public java.lang.String getErrorMessageKey()
public TypedProperty getErrorProperties()
TypedProperty
object representing the error
properties.public java.lang.String getErrorTaskName()
public abstract java.lang.String getErrorType()
public abstract java.lang.String getGenericErrorTask()
public java.lang.String getMessageKey()
public static java.lang.String getStackTrace(java.lang.Throwable exc)
String
object.exc
- A Throwable
object.public java.lang.Throwable getThrowable()
ECException
object associated with this
exception.ECException
object.public java.lang.String getUserMessage(java.util.Locale loc)
public void setErrorTaskName(java.lang.String viewtask)
viewtask
- The name of the error view task.public void setException(java.lang.Throwable exc)
Exception
object associated with this
exception.exc
- A Throwable
object.public void setOrginatingCommand(java.lang.String value)
value
- The name of the command.public void setThrowable(java.lang.Throwable exc)
Exception
object associated with this
exception.exc
- The Throwable
object.public ECParameterError[] getECParameterErrors()
ECParameterError
objects associated
with the exception.ECParameterError
objects.public ECMessage getECMessage()
ECMessage
object associated with the
exception.ECMessage
object associated with the exception.public java.lang.Object[] getMessageParameters()
public java.lang.String[] getSymptomData()
public java.lang.String getCorrelationIdentifier()
getCorrelationIdentifier
in interface com.ibm.commerce.exception.ECCorrelatedIdentity
public boolean isRecoverable()
ECException
is a response to
an exception caused by concurrency control (that is,
TransactionRollback
because of database deadlocks), and not
related to either system configuration or attributes.boolean
value indicating whether the request
should be retried (true if it should, false otherwise).public void setRecoverable(boolean recoverable)
recoverable
- Whether the exception is recoverable.public void addLogData(java.util.Map logData)
logData
- The additional logging data.public void addLogData(java.lang.String name, java.lang.Object value)
name
- The name of the log data.value
- The value of the log data.public void printStackTrace(java.io.PrintStream output)
printStackTrace
in class com.ibm.websphere.exception.DistributedException
output
- Indicates where to write the stack trace and other output.Throwable.printStackTrace(java.io.PrintStream)
public void printStackTrace(java.io.PrintWriter output)
printStackTrace
in interface com.ibm.websphere.exception.DistributedExceptionEnabled
printStackTrace
in class com.ibm.websphere.exception.DistributedException
output
- Indicates where to write the stack trace and other output.Throwable.printStackTrace(java.io.PrintWriter)
public java.lang.String getMessage()
getMessage
in interface com.ibm.websphere.exception.DistributedExceptionEnabled
getMessage
in class com.ibm.websphere.exception.DistributedException
Throwable.getMessage()