Class CommandExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.shell.core.command.CommandExecutionException
All Implemented Interfaces:
Serializable

public class CommandExecutionException extends RuntimeException
Exception to signal that an error happened while executing a command.
Since:
4.0.0
Author:
Mahmoud Ben Hassine
See Also:
  • Constructor Details

    • CommandExecutionException

      public CommandExecutionException(String message)
      Create a new CommandExecutionException with the given message.
      Parameters:
      message - the detail message
    • CommandExecutionException

      public CommandExecutionException(String message, int exitCode)
      Create a new CommandExecutionException with the given message and exit code.
      Parameters:
      message - the detail message
      exitCode - the exit code associated with this exception
      Since:
      4.0.2
    • CommandExecutionException

      public CommandExecutionException(String message, Throwable cause)
      Create a new CommandExecutionException with the given message and cause.
      Parameters:
      message - the detail message
      cause - the cause
  • Method Details

    • getExitCode

      public int getExitCode()
      Return the exit code associated with this exception.
      Returns:
      the exit code
      Since:
      4.0.2