Package nz.org.riskscape.picocli
Class CommandLine.ExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
nz.org.riskscape.picocli.CommandLine.PicocliException
nz.org.riskscape.picocli.CommandLine.ExecutionException
- All Implemented Interfaces:
Serializable
- Enclosing class:
- CommandLine
Exception indicating a problem while invoking a command or subcommand.
Keeps a reference to the
CommandLine
object where the cause exception occurred,
so that client code can tailor their handling for the specific command (print the command's usage help message, for example).- Since:
- 2.0
- See Also:
-
Constructor Summary
ConstructorDescriptionExecutionException
(CommandLine commandLine, String msg) ExecutionException
(CommandLine commandLine, String msg, Throwable t) -
Method Summary
Modifier and TypeMethodDescriptionReturns theCommandLine
object for the (sub)command that could not be invoked.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExecutionException
-
ExecutionException
-
-
Method Details
-
getCommandLine
Returns theCommandLine
object for the (sub)command that could not be invoked.- Returns:
- the
CommandLine
object for the (sub)command where invocation failed.
-