Package joptsimple

Class OptionException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IllegalOptionSpecificationException, MissingRequiredOptionsException, MultipleArgumentsForOptionException, OptionArgumentConversionException, OptionMissingRequiredArgumentException, UnavailableOptionException, UnconfiguredOptionException, UnrecognizedOptionException

public abstract class OptionException extends RuntimeException
Thrown when a problem occurs during option parsing.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • specsToStrings

      private List<String> specsToStrings(Collection<? extends OptionSpec<?>> options)
    • specToString

      private String specToString(OptionSpec<?> option)
    • options

      public List<String> options()
      Gives the option being considered when the exception was created.
      Returns:
      the option being considered when the exception was created
    • singleOptionString

      protected final String singleOptionString()
    • singleOptionString

      protected final String singleOptionString(String option)
    • multipleOptionString

      protected final String multipleOptionString()
    • unrecognizedOption

      static OptionException unrecognizedOption(String option)
    • getMessage

      public final String getMessage()
      Overrides:
      getMessage in class Throwable
    • localizedMessage

      final String localizedMessage(Locale locale)
    • formattedMessage

      private String formattedMessage(Locale locale)
    • messageArguments

      abstract Object[] messageArguments()