public class CommandProcessingException extends RuntimeException
Modifier and Type | Field and Description |
---|---|
static int |
ARGUMENT_INVALID
Error Type indicating an invalid parameter of a command.
|
static int |
COMMAND_INVALID
Error Type indicating an invalid command
|
static int |
COMMAND_INVALID_OR_UNAVAILABLE
Error Type indicating an unknown or unavailable command.
|
static int |
COMMAND_NAME_AMBIGUOUS
Error Type indicating an ambiguous command name
|
static int |
OPTION_INVALID
Error Type indicating an invalid named parameter of a command.
|
static int |
OPTION_VALUE_INVALID
Error Type indicating an invalid value for a parameter of a command.
|
static int |
OPTION_VALUE_REQUIRED
Error Type indicating the absence of value for named parameter of a command.
|
static int |
REQUIRED_ARGUMENT_MISSING
Error Type indicating the absence of a mandatory parameter of a command.
|
static int |
REQUIRED_OPTION_MISSING
Error Type indicating the absence of a mandatory named parameter of a command.
|
static int |
RESOURCE_ACCESS_ERROR
Error Type indicating IO errors occurred while accessing File/Network resource
|
Constructor and Description |
---|
CommandProcessingException(String message,
int errorType,
Object errorData)
Constructs a new
CommandProcessingException |
Modifier and Type | Method and Description |
---|---|
Object |
getErrorData()
Returns the error data.
|
int |
getErrorType()
Returns the Error Type.
|
String |
toString()
Returns the String representation of this
CommandProcessingException |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public static final int COMMAND_INVALID
public static final int COMMAND_NAME_AMBIGUOUS
public static final int COMMAND_INVALID_OR_UNAVAILABLE
public static final int OPTION_INVALID
public static final int ARGUMENT_INVALID
public static final int OPTION_VALUE_INVALID
public static final int REQUIRED_OPTION_MISSING
public static final int REQUIRED_ARGUMENT_MISSING
public static final int OPTION_VALUE_REQUIRED
public static final int RESOURCE_ACCESS_ERROR
public CommandProcessingException(String message, int errorType, Object errorData)
CommandProcessingException
message
- The error detail message.errorType
- One of the error types defined in CommandProcessingException
errorData
- Additional information about the error.public int getErrorType()
public Object getErrorData()