Class CommandException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.boot.cli.command.CommandException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NoHelpCommandArgumentsException,NoSuchCommandException,ShellExitException
Runtime exception wrapper that defines additional
CommandException.Options that are understood
by the CommandRunner.- Since:
- 1.0.0
- Author:
- Phillip Webb
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCommandException(String message, Throwable cause, CommandException.Option... options) Create a newCommandExceptionwith the specified options.CommandException(String message, CommandException.Option... options) Create a newCommandExceptionwith the specified options.CommandException(Throwable cause, CommandException.Option... options) Create a newCommandExceptionwith the specified options.CommandException(CommandException.Option... options) Create a newCommandExceptionwith the specified options. -
Method Summary
Modifier and TypeMethodDescriptionReturns a set of options that are understood by theCommandRunner.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommandException
Create a newCommandExceptionwith the specified options.- Parameters:
options- the exception options
-
CommandException
Create a newCommandExceptionwith the specified options.- Parameters:
message- the exception message to display to the useroptions- the exception options
-
CommandException
Create a newCommandExceptionwith the specified options.- Parameters:
message- the exception message to display to the usercause- the underlying causeoptions- the exception options
-
CommandException
Create a newCommandExceptionwith the specified options.- Parameters:
cause- the underlying causeoptions- the exception options
-
-
Method Details
-
getOptions
Returns a set of options that are understood by theCommandRunner.- Returns:
- the options understood by the runner
-