public final class CommandException extends Exception
Constructor and Description |
---|
CommandException(int exitCode)
Simple constructor for the CommandException to indicate that a
processing error occurred.
|
CommandException(int exitCode,
String locMsg)
Creates new exception with a localised message assigned to it.
|
Modifier and Type | Method and Description |
---|---|
int |
getExitCode()
Returns an exit code for this exception.
|
String |
getLocalizedMessage()
Localized message describing the problem that is usually printed
to the user.
|
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public CommandException(int exitCode)
exitCode
represents
the value to be usually send to as a return value to System.exit(int)
.exitCode
- the value, should be different than zeropublic CommandException(int exitCode, String locMsg)
exitCode
- exit code to report from the exceptionlocMsg
- localised messagepublic int getExitCode()
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable