Package joptsimple
Class OptionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- joptsimple.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)
-
-
-
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 classjava.lang.Throwable
-
-