Package com.ibm.websphere.exception
Class DistributedExceptionInfo
java.lang.Object
com.ibm.websphere.exception.DistributedExceptionInfo
- All Implemented Interfaces:
Serializable
Does the work for exception classes that implement the
DistributedExceptionEnabled interface.
- See Also:
-
Constructor Summary
ConstructorDescriptionDistributedExceptionInfo
(DistributedExceptionEnabled currentException) Constructor with current exceptionDistributedExceptionInfo
(DistributedExceptionEnabled currentException, Throwable previousException) Constructor with the current and previous exceptionsDistributedExceptionInfo
(String defaultMessage, DistributedExceptionEnabled currentException) Constructor with current exceptionDistributedExceptionInfo
(String defaultMessage, DistributedExceptionEnabled currentException, Throwable previousException) Constructor with current exceptionDistributedExceptionInfo
(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText, DistributedExceptionEnabled currentException) Constructor with localization message information and the current exception..DistributedExceptionInfo
(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText, DistributedExceptionEnabled currentException, Throwable previousException) Constructor with localization message information and the current exception.. -
Method Summary
Modifier and TypeMethodDescriptionGet the class name for this exception.Get the default message for this exceptiongetException
(String exceptionClassName) Get a specific exception in a possible chain of exceptions.Object[]
Get the format arguments.Retrieve the text message for this exception.Get the original exception in a possible chain of exceptions.Retrieves the previous exceptionRetrieve the previous exception info object.Get the resource bundle nameGet the resource key that will be used to retrieve the message from the resource bundlevoid
Print the stack trace to a print writer.void
setDefaultMessage
(String defaultText) Insert the method's description here.void
setLocalizationInfo
(String resourceBundleName, String resourceKey, Object[] formatArguments) FOR WEBSPHERE INTERNAL USE ONLY Set the localization information.
-
Constructor Details
-
DistributedExceptionInfo
Constructor with current exception- Parameters:
currentException
- java.lang.Throwable
-
DistributedExceptionInfo
public DistributedExceptionInfo(DistributedExceptionEnabled currentException, Throwable previousException) Constructor with the current and previous exceptions- Parameters:
currentException
- java.lang.ThrowablepreviousException
- java.lang.Throwable
-
DistributedExceptionInfo
public DistributedExceptionInfo(String defaultMessage, DistributedExceptionEnabled currentException) Constructor with current exception- Parameters:
currentException
- java.lang.Throwable
-
DistributedExceptionInfo
public DistributedExceptionInfo(String defaultMessage, DistributedExceptionEnabled currentException, Throwable previousException) Constructor with current exception- Parameters:
currentException
- java.lang.Throwable
-
DistributedExceptionInfo
public DistributedExceptionInfo(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText, DistributedExceptionEnabled currentException) Constructor with localization message information and the current exception..- Parameters:
resourceBundleName
- java.lang.String The name of resource bundle that will be used to retrieve the message for getMessage().resourceKey
- java.lang.String The key in the resource bundle that will be used to select the specific message that is retrieved for getMessage().formatArguments
- java.lang.Object[] The arguments to be passed to the MessageFormat class to act as replacement variables in the message that is retrieved from the resource bundle. Valid types are those supported by MessageFormat.defaultText
- java.lang.String The default message that will be used in getMessage() if the resource bundle or the key cannot be foundcurrentException
- DistributedExceptionEnabled The current exception- See Also:
-
DistributedExceptionInfo
public DistributedExceptionInfo(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText, DistributedExceptionEnabled currentException, Throwable previousException) Constructor with localization message information and the current exception..- Parameters:
resourceBundleName
- java.lang.String The name of resource bundle that will be used to retrieve the message for getMessage().resourceKey
- java.lang.String The key in the resource bundle that will be used to select the specific message that is retrieved for getMessage().formatArguments
- java.lang.Object[] The arguments to be passed to the MessageFormat class to act as replacement variables in the message that is retrieved from the resource bundle. Valid types are those supported by MessageFormat.defaultText
- java.lang.String The default message that will be used in getMessage() if the resource bundle or the key cannot be foundcurrentException
- DistributedExceptionEnabled The current exceptionpreviousException
- java.lang.Throwable The chained exception- See Also:
-
-
Method Details
-
getClassName
Get the class name for this exception.- Returns:
- java.lang.String The class name
-
getDefaultMessage
Get the default message for this exception- Returns:
- java.lang.String The default message
-
getException
Get a specific exception in a possible chain of exceptions. If there are multiple exceptions in the chain, the most recent one thrown will be returned. If the exceptions does not exist or no exceptions have been chained, null will be returned.- Parameters:
String
- exceptionClassName the class name of the specific exception.- Returns:
- java.lang.Throwable The specific exception in a chain of exceptions. If no exceptions have been chained, null will be returned.
- Throws:
ExceptionInstantiationException
- An exception occurred while trying to instantiate an exception object. If this exception is thrown, the relevant information can be retrieved using the getPreviousExceptionInfo() method.
-
getFormatArguments
Get the format arguments.- Returns:
- java.lang.Object[] The format arguments
-
getMessage
Retrieve the text message for this exception. The default message (which may be null) will be returned in any of the following situations:- No resource bundle name exists
- No resource key exists
- The resource bundle could not be found
- The key was not found in the resource bundle
- Returns:
- java.lang.String message for this exception
-
getOriginalException
Get the original exception in a possible chain of exceptions. If no previous exceptions have been chained, null will be returned.- Returns:
- java.lang.Throwable The first exception in a chain of exceptions. If no exceptions have been chained, null will be returned.
- Throws:
ExceptionInstantiationException
- An exception occurred while trying to instantiate an exception object. If this exception is thrown, the relevant information can be retrieved by using the getPreviousExceptionInfo() method.
-
getPreviousException
Retrieves the previous exception- Returns:
- java.lang.Throwable
- Throws:
ExceptionInstantiationException
- An exception occurred while trying to instantiate an exception object. If this exception is thrown, the relevant information can be retrieved by using the getPreviousExceptionInfo() method.
-
getPreviousExceptionInfo
Retrieve the previous exception info object. If it doesn't exist, null will be returned.- Returns:
- com.ibm.websphere.exception.DistributedExceptionInfo
-
getResourceBundleName
Get the resource bundle name- Returns:
- java.lang.String The resource bundle name
-
getResourceKey
Get the resource key that will be used to retrieve the message from the resource bundle- Returns:
- java.lang.String
-
printStackTrace
Print the stack trace to a print writer. If this exception was thrown from a remote process, the stack trace will include the stack from the remote process.- Parameters:
param
- java.io.PrintWriter
-
setDefaultMessage
Insert the method's description here. Creation date: (2/28/00 11:26:22 AM)- Parameters:
defaultText
- java.lang.String
-
setLocalizationInfo
public void setLocalizationInfo(String resourceBundleName, String resourceKey, Object[] formatArguments) FOR WEBSPHERE INTERNAL USE ONLY Set the localization information.- Parameters:
resourceBundleName
- java.lang.StringresourceKey
- java.lang.Stringarguments
- java.lang.Object[]
-