picocli

## Class CommandLine.ParameterException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - picocli.CommandLine.PicocliException
        - - 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

### Constructor Summary

Constructors
Constructor and Description
`CommandLine.ParameterException(CommandLine commandLine, java.lang.String msg)` Constructs a new ParameterException with the specified CommandLine and error message.
`CommandLine.ParameterException(CommandLine commandLine, java.lang.String msg, java.lang.Exception ex)` Constructs a new ParameterException with the specified CommandLine and error message.

### Method Summary

Methods
`CommandLine` `getCommandLine()` Returns the `CommandLine` object 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CommandLine.ParameterException

    public CommandLine.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 invalid
  `msg` - describes the problem
Since:
  2.0

#### CommandLine.ParameterException

    public CommandLine.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 invalid
  `msg` - describes the problem
  `ex` - the exception that caused this ParameterException
Since:
  2.0

### Method Detail

#### 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