java.lang.Object
java.lang.Throwable
java.lang.Exception
com.github.sttk.cliargs.exceptions.InvalidOption
com.github.sttk.cliargs.exceptions.OptionArgIsInvalid
- All Implemented Interfaces:
Serializable
Is the exception which indicates that the option argument is invalidated by the validator in the
option configuration.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a string which represents the content of this exception.option()
Gets the option name that caused this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
storeKey
The store key of the option configuration that caused this exception. -
option
The option name that caused this exception. -
optArg
The option argument that was validated. -
details
The details for the invalidation.
-
-
Constructor Details
-
OptionArgIsInvalid
public OptionArgIsInvalid(String storeKey, String option, String optArg, String details, Throwable cause) Constructs an instance of this class.- Parameters:
storeKey
- The store key of the option configuration that caused this exception.option
- The option name that caused this exception.optArg
- The option argument that as validated.details
- The details for the invalidation.cause
- The cause of this exception.
-
-
Method Details
-
option
Gets the option name that caused this exception.- Specified by:
option
in classInvalidOption
- Returns:
- The option name.
-
getMessage
Returns a string which represents the content of this exception.- Overrides:
getMessage
in classThrowable
- Returns:
- The exception message.
-