com.ibm.websphere.exception

Class DistributedExceptionInfo

  • java.lang.Object
    • com.ibm.websphere.exception.DistributedExceptionInfo
  • All Implemented Interfaces:
    java.io.Serializable


    public class DistributedExceptionInfo
    extends java.lang.Object
    implements java.io.Serializable
    Does the work for exception classes that implement the DistributedExceptionEnabled interface.
    See Also:
    Serialized Form
    • Constructor Detail

      • DistributedExceptionInfo

        public DistributedExceptionInfo(DistributedExceptionEnabled currentException)
        Constructor with current exception
        Parameters:
        currentException - java.lang.Throwable
      • DistributedExceptionInfo

        public DistributedExceptionInfo(DistributedExceptionEnabled currentException,
                                java.lang.Throwable previousException)
        Constructor with the current and previous exceptions
        Parameters:
        currentException - java.lang.Throwable
        previousException - java.lang.Throwable
      • DistributedExceptionInfo

        public DistributedExceptionInfo(java.lang.String defaultMessage,
                                DistributedExceptionEnabled currentException)
        Constructor with current exception
        Parameters:
        currentException - java.lang.Throwable
      • DistributedExceptionInfo

        public DistributedExceptionInfo(java.lang.String defaultMessage,
                                DistributedExceptionEnabled currentException,
                                java.lang.Throwable previousException)
        Constructor with current exception
        Parameters:
        currentException - java.lang.Throwable
      • DistributedExceptionInfo

        public DistributedExceptionInfo(java.lang.String resourceBundleName,
                                java.lang.String resourceKey,
                                java.lang.Object[] formatArguments,
                                java.lang.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 found
        currentException - DistributedExceptionEnabled The current exception
        See Also:
        getMessage(), MessageFormat
      • DistributedExceptionInfo

        public DistributedExceptionInfo(java.lang.String resourceBundleName,
                                java.lang.String resourceKey,
                                java.lang.Object[] formatArguments,
                                java.lang.String defaultText,
                                DistributedExceptionEnabled currentException,
                                java.lang.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 found
        currentException - DistributedExceptionEnabled The current exception
        previousException - java.lang.Throwable The chained exception
        See Also:
        getMessage(), MessageFormat
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Get the class name for this exception.
        Returns:
        java.lang.String The class name
      • getDefaultMessage

        public java.lang.String getDefaultMessage()
        Get the default message for this exception
        Returns:
        java.lang.String The default message
      • getException

        public java.lang.Throwable getException(java.lang.String exceptionClassName)
                                         throws ExceptionInstantiationException
        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

        public java.lang.Object[] getFormatArguments()
        Get the format arguments.
        Returns:
        java.lang.Object[] The format arguments
      • getMessage

        public java.lang.String 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

        public java.lang.Throwable getOriginalException()
                                                 throws ExceptionInstantiationException
        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

        public java.lang.Throwable getPreviousException()
                                                 throws ExceptionInstantiationException
        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

        public DistributedExceptionInfo getPreviousExceptionInfo()
        Retrieve the previous exception info object. If it doesn't exist, null will be returned.
        Returns:
        com.ibm.websphere.exception.DistributedExceptionInfo
      • getResourceBundleName

        public java.lang.String getResourceBundleName()
        Get the resource bundle name
        Returns:
        java.lang.String The resource bundle name
      • getResourceKey

        public java.lang.String getResourceKey()
        Get the resource key that will be used to retrieve the message from the resource bundle
        Returns:
        java.lang.String
      • printStackTrace

        public void printStackTrace(java.io.PrintWriter pw)
        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

        public void setDefaultMessage(java.lang.String defaultText)
        Insert the method's description here. Creation date: (2/28/00 11:26:22 AM)
        Parameters:
        defaultText - java.lang.String
      • setLocalizationInfo

        public void setLocalizationInfo(java.lang.String resourceBundleName,
                               java.lang.String resourceKey,
                               java.lang.Object[] formatArguments)
        FOR WEBSPHERE INTERNAL USE ONLY Set the localization information.
        Parameters:
        resourceBundleName - java.lang.String
        resourceKey - java.lang.String
        arguments - java.lang.Object[]
IBM WebSphere Application ServerTM
Release 8.5