Class CommandLine.ParameterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.logging.log4j.core.tools.picocli.CommandLine.PicocliException
org.apache.logging.log4j.core.tools.picocli.CommandLine.ParameterException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CommandLine.MaxValuesforFieldExceededException,CommandLine.MissingParameterException,CommandLine.MissingTypeConverterException,CommandLine.OverwrittenOptionException,CommandLine.UnmatchedArgumentException
- Enclosing class:
CommandLine
Exception indicating something went wrong while parsing command line options.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParameterException(CommandLine commandLine, String msg) Constructs a new ParameterException with the specified CommandLine and error message.ParameterException(CommandLine commandLine, String msg, Exception ex) Constructs a new ParameterException with the specified CommandLine and error message. -
Method Summary
Modifier and TypeMethodDescriptionReturns theCommandLineobject for the (sub)command whose input could not be parsed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParameterException
Constructs a new ParameterException with the specified CommandLine and error message.- Parameters:
commandLine- the command or subcommand whose input was invalidmsg- describes the problem- Since:
- 2.0
-
ParameterException
Constructs a new ParameterException with the specified CommandLine and error message.- Parameters:
commandLine- the command or subcommand whose input was invalidmsg- describes the problemex- the exception that caused this ParameterException- Since:
- 2.0
-
-
Method Details
-
getCommandLine
Returns theCommandLineobject for the (sub)command whose input could not be parsed.- Returns:
- the
CommandLineobject for the (sub)command where parsing failed. - Since:
- 2.0
-