Package joptsimple

Class OptionException

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class OptionException
    extends java.lang.RuntimeException
    Thrown when a problem occurs during option parsing.
    Author:
    Paul Holser
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected OptionException​(java.util.Collection<? extends OptionSpec<?>> options)  
      protected OptionException​(java.util.Collection<? extends OptionSpec<?>> options, java.lang.Throwable cause)  
      protected OptionException​(java.util.List<java.lang.String> options)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()  
      protected java.lang.String multipleOptionString()  
      java.util.List<java.lang.String> options()
      Gives the option being considered when the exception was created.
      protected java.lang.String singleOptionString()  
      protected java.lang.String singleOptionString​(java.lang.String option)  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

      • OptionException

        protected OptionException​(java.util.List<java.lang.String> options)
      • OptionException

        protected OptionException​(java.util.Collection<? extends OptionSpec<?>> options)
      • OptionException

        protected OptionException​(java.util.Collection<? extends OptionSpec<?>> options,
                                  java.lang.Throwable cause)
    • Method Detail

      • options

        public java.util.List<java.lang.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 java.lang.String singleOptionString()
      • singleOptionString

        protected final java.lang.String singleOptionString​(java.lang.String option)
      • multipleOptionString

        protected final java.lang.String multipleOptionString()
      • getMessage

        public final java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable