Package org.apache.commons.cli
Class MissingArgumentException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.commons.cli.ParseException
-
- org.apache.commons.cli.MissingArgumentException
-
- All Implemented Interfaces:
java.io.Serializable
public class MissingArgumentException extends ParseException
Thrown when an option requiring an argument is not provided with an argument.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Option
option
The option requiring additional argumentsprivate static long
serialVersionUID
This exceptionserialVersionUID
.
-
Constructor Summary
Constructors Constructor Description MissingArgumentException(java.lang.String message)
Construct a newMissingArgumentException
with the specified detail message.MissingArgumentException(Option option)
Construct a newMissingArgumentException
with the specified detail message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Option
getOption()
Return the option requiring an argument that wasn't provided on the command line.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
This exceptionserialVersionUID
.- See Also:
- Constant Field Values
-
option
private Option option
The option requiring additional arguments
-
-
Constructor Detail
-
MissingArgumentException
public MissingArgumentException(Option option)
Construct a newMissingArgumentException
with the specified detail message.- Parameters:
option
- the option requiring an argument- Since:
- 1.2
-
MissingArgumentException
public MissingArgumentException(java.lang.String message)
Construct a newMissingArgumentException
with the specified detail message.- Parameters:
message
- the detail message
-
-
Method Detail
-
getOption
public Option getOption()
Return the option requiring an argument that wasn't provided on the command line.- Returns:
- the related option
- Since:
- 1.2
-
-