Class InvalidValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.vertx.core.cli.CLIException
io.vertx.core.cli.InvalidValueException
- All Implemented Interfaces:
Serializable
Exception thrown when an option or an argument receives an invalid value.
- Author:
- Clement Escoffier invalid input: '<'[email protected]>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidValueException(Argument argument, String value, Exception cause) Creates a new instance ofInvalidValueExceptionfor the given argument and the given value.InvalidValueException(Option option, String value) Creates a new instance ofInvalidValueExceptionfor the given option and the given value.InvalidValueException(Option option, String value, Exception cause) Creates a new instance ofInvalidValueExceptionfor the given option and the given value. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidValueException
Creates a new instance ofInvalidValueExceptionfor 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- the optionvalue- the value
-
InvalidValueException
Creates a new instance ofInvalidValueExceptionfor 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- the argumentvalue- the valuecause- the cause
-
InvalidValueException
Creates a new instance ofInvalidValueExceptionfor 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- the optionvalue- the valuecause- the cause
-
-
Method Details
-
getOption
- Returns:
- the option, may be
nullif the exception is about an argument.
-
getValue
- Returns:
- the invalid value.
-
getArgument
- Returns:
- the argument, may be
nullif the exception is about an option.
-