Class CommandExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
gov.nist.secauto.metaschema.cli.processor.command.CommandExecutionException
- All Implemented Interfaces:
Serializable
For use in commands to short-circut command execution.
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a new exception with the providedcode
, and no message or cause.CommandExecutionException
(ExitCode code, String message) Constructs a new exception with the providedcode
,message
, and no cause.CommandExecutionException
(ExitCode code, String message, Throwable cause) Constructs a new exception with the providedcode
,message
, andcause
.CommandExecutionException
(ExitCode code, Throwable cause) Constructs a new exception with no message and the providedcode
andcause
. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommandExecutionException
Constructs a new exception with the providedcode
, and no message or cause.- Parameters:
code
- the exit code associated with this error
-
CommandExecutionException
Constructs a new exception with the providedcode
,message
, and no cause.- Parameters:
code
- the exit code associated with this errormessage
- the exception message
-
CommandExecutionException
Constructs a new exception with no message and the providedcode
andcause
.- Parameters:
code
- the exit code associated with this errorcause
- the original exception cause
-
CommandExecutionException
Constructs a new exception with the providedcode
,message
, andcause
.- Parameters:
code
- the exit code associated with this errormessage
- the exception messagecause
- the original exception cause
-
-
Method Details
-
toExitStatus
Generate anExitStatus
based on this exception.- Returns:
- the exit status
-