Class CommandExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.shell.core.command.CommandExecutionException
- All Implemented Interfaces:
Serializable
Exception to signal that an error happened while executing a command.
- Since:
- 4.0.0
- Author:
- Mahmoud Ben Hassine
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandExecutionException(String message) Create a newCommandExecutionExceptionwith the given message.CommandExecutionException(String message, int exitCode) Create a newCommandExecutionExceptionwith the given message and exit code.CommandExecutionException(String message, Throwable cause) Create a newCommandExecutionExceptionwith the given message and cause. -
Method Summary
Modifier and TypeMethodDescriptionintReturn the exit code associated with this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommandExecutionException
Create a newCommandExecutionExceptionwith the given message.- Parameters:
message- the detail message
-
CommandExecutionException
Create a newCommandExecutionExceptionwith the given message and exit code.- Parameters:
message- the detail messageexitCode- the exit code associated with this exception- Since:
- 4.0.2
-
CommandExecutionException
Create a newCommandExecutionExceptionwith the given message and cause.- Parameters:
message- the detail messagecause- the cause
-
-
Method Details
-
getExitCode
public int getExitCode()Return the exit code associated with this exception.- Returns:
- the exit code
- Since:
- 4.0.2
-