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

public class CommandException extends RuntimeException
Runtime exception wrapper that defines additional CommandException.Options that are understood by the CommandRunner.
Since:
1.0.0
Author:
Phillip Webb
See Also:
  • Constructor Details

    • CommandException

      public CommandException(CommandException.Option... options)
      Create a new CommandException with the specified options.
      Parameters:
      options - the exception options
    • CommandException

      public CommandException(String message, CommandException.Option... options)
      Create a new CommandException with the specified options.
      Parameters:
      message - the exception message to display to the user
      options - the exception options
    • CommandException

      public CommandException(String message, Throwable cause, CommandException.Option... options)
      Create a new CommandException with the specified options.
      Parameters:
      message - the exception message to display to the user
      cause - the underlying cause
      options - the exception options
    • CommandException

      public CommandException(Throwable cause, CommandException.Option... options)
      Create a new CommandException with the specified options.
      Parameters:
      cause - the underlying cause
      options - the exception options
  • Method Details