jargs.gnu

## Class CmdLineParser.IllegalOptionValueException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - jargs.gnu.CmdLineParser.OptionException
      - - jargs.gnu.CmdLineParser.IllegalOptionValueException

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    CmdLineParser

      public static class CmdLineParser.IllegalOptionValueException
      extends CmdLineParser.OptionException

  Thrown when an illegal or missing value is given by the user for an option that takes a value. `getMessage()` returns an error string suitable for reporting the error to the user (in English).
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IllegalOptionValueException(CmdLineParser.Option opt, String value)` Instantiates a new illegal option value exception.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CmdLineParser.Option` | `getOption()` Gets the option.
    `String` | `getValue()` Gets the value.

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

    - #### IllegalOptionValueException

          public IllegalOptionValueException(CmdLineParser.Option opt,
                                             String value)

      Instantiates a new illegal option value exception.
      Parameters:
        `opt` - the opt
        `value` - the value

  - ### Method Detail

    - #### getOption

          public CmdLineParser.Option getOption()

      Gets the option.
      Returns:
        the name of the option whose value was illegal (e.g. "-u")

    - #### getValue

          public String getValue()

      Gets the value.
      Returns:
        the illegal value

Copyright © 2009–2017 Jeremy Landis. All rights reserved.