Package com.ibm.websphere.command
Class CommandException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ibm.websphere.exception.DistributedException
com.ibm.websphere.command.CommandException
- All Implemented Interfaces:
com.ibm.websphere.exception.DistributedExceptionEnabled
,Serializable
- Direct Known Subclasses:
UnauthorizedAccessException
,UnavailableCompensatingCommandException
,UnsetInputPropertiesException
public class CommandException
extends com.ibm.websphere.exception.DistributedException
This is the base class for all Command exceptions. All application exceptions
used in a Command implementation must extend the CommandException class.
The CommandException class supports the chaining of distributed exceptions.
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructor without parameters.CommandException
(String message) Constructor with a message parameter.CommandException
(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText) Constructor with information for localizing messages.CommandException
(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText, Throwable exception) Constructor with information for localizing messages and an exception to chain.CommandException
(String message, Throwable throwable) Constructor with a message and throwable exception, which is saved.CommandException
(Throwable throwable) Constructor with a throwable exception, which is saved. -
Method Summary
Methods inherited from class com.ibm.websphere.exception.DistributedException
getException, getExceptionInfo, getMessage, getOriginalException, getPreviousException, printStackTrace, printStackTrace, printStackTrace, printSuperStackTrace, printSuperStackTrace, setDefaultMessage, setLocalizationInfo
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
CommandException
public CommandException()Constructor without parameters. -
CommandException
Constructor with a message parameter.- Parameters:
message
- A string describing the exception.
-
CommandException
public CommandException(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText) Constructor with information for localizing messages.- Parameters:
resourceBundleName
- The name of resource bundle that will be used to retrieve the message for getMessage() method.resourceKey
- The key in the resource bundle that will be used to select the specific message that is retrieved for the getMessage() method.formatArguments
- 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
- The default message that will be used by the getMessage() method if the resource bundle or the key cannot be found.
-
CommandException
public CommandException(String resourceBundleName, String resourceKey, Object[] formatArguments, String defaultText, Throwable exception) Constructor with information for localizing messages and an exception to chain.- Parameters:
resourceBundleName
- The name of resource bundle that will be used to retrieve the message for getMessage() method.resourceKey
- The key in the resource bundle that will be used to select the specific message retrieved for the getMessage() method.formatArguments
- 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
- The default message that will be used by the getMessage() method if the resource bundle or the key cannot be found.exception
- The exception that is to be chained.
-
CommandException
Constructor with a throwable exception, which is saved.- Parameters:
throwable
- The exception to save.
-
CommandException
Constructor with a message and throwable exception, which is saved.- Parameters:
throwable
- The exception to save.
-
-
Method Details
-
getException
Returns a throwable exception.- Returns:
- A throwable exception.
-