UnrecognizedOptionException
Date: 2017-04-22

org.apache.commons.cli

## Class UnrecognizedOptionException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.apache.commons.cli.ParseException
      - - org.apache.commons.cli.UnrecognizedOptionException

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    AmbiguousOptionException

      public class UnrecognizedOptionException
      extends ParseException

  Exception thrown during parsing signalling an unrecognized option was seen.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnrecognizedOptionException(java.lang.String message)` Construct a new `UnrecognizedArgumentException` with the specified detail message.
    `UnrecognizedOptionException(java.lang.String message, java.lang.String option)` Construct a new `UnrecognizedArgumentException` with the specified option and detail message.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getOption()` Returns the unrecognized option.

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

    - #### UnrecognizedOptionException

          public UnrecognizedOptionException(java.lang.String message)

      Construct a new `UnrecognizedArgumentException` with the specified detail message.
      Parameters:
        `message` - the detail message

    - #### UnrecognizedOptionException

          public UnrecognizedOptionException(java.lang.String message,
                                     java.lang.String option)

      Construct a new `UnrecognizedArgumentException` with the specified option and detail message.
      Parameters:
        `message` - the detail message
        `option` - the unrecognized option
      Since:
        1.2

  - ### Method Detail

    - #### getOption

          public java.lang.String getOption()

      Returns the unrecognized option.
      Returns:
        the related option
      Since:
        1.2