Package joptsimple
Class OptionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- joptsimple.OptionException
-
- All Implemented Interfaces:
Serializable
public abstract class OptionException extends RuntimeException
Thrown when a problem occurs during option parsing.- Author:
- Paul Holser
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OptionException(Collection<? extends OptionSpec<?>> options)
protected
OptionException(Collection<? extends OptionSpec<?>> options, Throwable cause)
protected
OptionException(List<String> options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
protected String
multipleOptionString()
List<String>
options()
Gives the option being considered when the exception was created.protected String
singleOptionString()
protected String
singleOptionString(String option)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OptionException
protected OptionException(Collection<? extends OptionSpec<?>> options)
-
OptionException
protected OptionException(Collection<? extends OptionSpec<?>> options, Throwable cause)
-
-
Method Detail
-
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()
-
multipleOptionString
protected final String multipleOptionString()
-
getMessage
public final String getMessage()
- Overrides:
getMessage
in classThrowable
-
-