Package io.github.qishr.cascara.common.util
Class ParameterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.qishr.cascara.common.util.CommandLine.PicocliException
io.github.qishr.cascara.common.util.CommandLine.ParameterException
Enclosing Class:
io.github.qishr.cascara.common.util.CommandLine
Direct Known Subtypes:
MissingParameterException, MutuallyExclusiveArgsException, UnmatchedArgumentException, MaxValuesExceededException, OverwrittenOptionException, MissingTypeConverterException
public static class ParameterException
extends PicocliException
Exception indicating something went wrong while parsing command line options.
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| protected final CommandLine | commandLine |
Constructor Summary
| Constructor | Description |
|---|---|
| ParameterException(CommandLine commandLine, String msg) | Constructs a new ParameterException with the specified CommandLine and error message. |
| ParameterException(CommandLine commandLine, String msg, Throwable t) | Constructs a new ParameterException with the specified CommandLine and error message. |
| ParameterException(CommandLine commandLine, String msg, Throwable t, ArgSpec argSpec, String value) | Constructs a new ParameterException with the specified CommandLine and error message. |
| ParameterException(CommandLine commandLine, String msg, ArgSpec argSpec, String value) | Constructs a new ParameterException with the specified CommandLine and error message. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public CommandLine | getCommandLine() | Returns the CommandLine object for the (sub)command whose input could not be parsed. |
| public ArgSpec | getArgSpec() | Returns the ArgSpec object for the (sub)command whose input could not be parsed. |
| public String | getValue() | Returns the String value for the (sub)command whose input could not be parsed. |
Field Details
commandLine
protected final CommandLine commandLine
Method Details
getCommandLine
public CommandLine getCommandLine()
Returns the CommandLine 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
getArgSpec
public ArgSpec getArgSpec()
Returns the ArgSpec object for the (sub)command whose input could not be parsed.
Returns:
the ArgSpec object for the (sub)command where parsing failed.
Since:
3.2
getValue
public String getValue()
Returns the String value for the (sub)command whose input could not be parsed.
Returns:
the String value for the (sub)command where parsing failed.
Since:
3.2