类 CommandException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.boot.cli.command.CommandException
- 所有已实现的接口:
Serializable
public class CommandException extends RuntimeException
Runtime exception wrapper that defines additionalCommandException.Option
s that are understood by theCommandRunner
.- 另请参阅:
- 序列化表格
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
CommandException.Option
Specific options understood by theCommandRunner
.
构造器概要
构造器 构造器 说明 CommandException(String message, Throwable cause, CommandException.Option... options)
Create a newCommandException
with the specified options.CommandException(String message, CommandException.Option... options)
Create a newCommandException
with the specified options.CommandException(Throwable cause, CommandException.Option... options)
Create a newCommandException
with the specified options.CommandException(CommandException.Option... options)
Create a newCommandException
with the specified options.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Set<CommandException.Option>
getOptions()
Returns a set of options that are understood by theCommandRunner
.
构造器详细资料
CommandException
public CommandException(CommandException.Option... options)
Create a newCommandException
with the specified options.- 参数:
options
- the exception options
CommandException
public CommandException(String message, CommandException.Option... options)
Create a newCommandException
with the specified options.- 参数:
message
- the exception message to display to the useroptions
- the exception options
CommandException
public CommandException(String message, Throwable cause, CommandException.Option... options)
Create a newCommandException
with the specified options.- 参数:
message
- the exception message to display to the usercause
- the underlying causeoptions
- the exception options
CommandException
public CommandException(Throwable cause, CommandException.Option... options)
Create a newCommandException
with the specified options.- 参数:
cause
- the underlying causeoptions
- the exception options
方法详细资料
getOptions
public Set<CommandException.Option> getOptions()
Returns a set of options that are understood by theCommandRunner
.- 返回:
- the options understood by the runner