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:
java.io.Serializable
- Direct Known Subclasses:
CommandLine.MaxValuesforFieldExceededException
,CommandLine.MissingParameterException
,CommandLine.MissingTypeConverterException
,CommandLine.OverwrittenOptionException
,CommandLine.UnmatchedArgumentException
- Enclosing class:
- CommandLine
public static class CommandLine.ParameterException extends CommandLine.PicocliException
Exception indicating something went wrong while parsing command line options.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private CommandLine
commandLine
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ParameterException(CommandLine commandLine, java.lang.String msg)
Constructs a new ParameterException with the specified CommandLine and error message.ParameterException(CommandLine commandLine, java.lang.String msg, java.lang.Exception ex)
Constructs a new ParameterException with the specified CommandLine and error message.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static CommandLine.ParameterException
create(CommandLine cmd, java.lang.Exception ex, java.lang.String arg, int i, java.lang.String[] args)
CommandLine
getCommandLine()
Returns theCommandLine
object for the (sub)command whose input could not be parsed.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
commandLine
private final CommandLine commandLine
-
-
Constructor Detail
-
ParameterException
public ParameterException(CommandLine commandLine, java.lang.String msg)
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
public ParameterException(CommandLine commandLine, java.lang.String msg, java.lang.Exception ex)
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 Detail
-
getCommandLine
public CommandLine getCommandLine()
Returns theCommandLine
object for the (sub)command whose input could not be parsed.- Returns:
- the
CommandLine
object for the (sub)command where parsing failed. - Since:
- 2.0
-
create
private static CommandLine.ParameterException create(CommandLine cmd, java.lang.Exception ex, java.lang.String arg, int i, java.lang.String[] args)
-
-