Top Description Fields Constructors Methods
io.vertx.core.cli

public Class InvalidValueException

extends CLIException
Class Inheritance

Exception thrown when an option or an argument receives an invalid value.
Author
Clement Escoffier

Field Summary

Modifier and TypeField and Description
private final Argument
private final Option
private final String

Constructor Summary

AccessConstructor and Description
public
InvalidValueException(Option
the option
option
,
String
the value
value
)

Creates a new instance of InvalidValueException for the given option and the given value.

public
InvalidValueException(Argument
the argument
argument
,
String
the value
value
,
Exception
the cause
cause
)

Creates a new instance of InvalidValueException for the given argument and the given value.

public
InvalidValueException(Option
the option
option
,
String
the value
value
,
Exception
the cause
cause
)

Creates a new instance of InvalidValueException for the given option and the given value.

Method Summary

Modifier and TypeMethod and Description
public Argument

Returns:

the argument, may be null if the exception is about an option.
getArgument
()

public Option

Returns:

the option, may be null if the exception is about an argument.
getOption
()

public String

Returns:

the invalid value.
getValue
()

Field Detail

argumentback to summary
private final Argument argument
optionback to summary
private final Option option
valueback to summary
private final String value

Constructor Detail

InvalidValueExceptionback to summary
public InvalidValueException(Option option, String value)

Creates a new instance of InvalidValueException for the given option and the given value. This constructor is used when the option receives a value while it does not accept another value.

Parameters
option:Option

the option

value:String

the value

InvalidValueExceptionback to summary
public InvalidValueException(Argument argument, String value, Exception cause)

Creates a new instance of InvalidValueException for the given argument and the given value. This constructor is used when the argument receives a value that cannot be "converted" to the desired type.

Parameters
argument:Argument

the argument

value:String

the value

cause:Exception

the cause

InvalidValueExceptionback to summary
public InvalidValueException(Option option, String value, Exception cause)

Creates a new instance of InvalidValueException for the given option and the given value. This constructor is used when the options receives a value that cannot be "converted" to the desired type.

Parameters
option:Option

the option

value:String

the value

cause:Exception

the cause

Method Detail

getArgumentback to summary
public Argument getArgument()
Returns:Argument

the argument, may be null if the exception is about an option.

getOptionback to summary
public Option getOption()
Returns:Option

the option, may be null if the exception is about an argument.

getValueback to summary
public String getValue()
Returns:String

the invalid value.