net.dpml.cli

Class OptionException

public class OptionException extends Exception

A problem found while dealing with command line options.

Version: @PROJECT-VERSION@

Author: @PUBLISHER-NAME@

Field Summary
static SetHELP_SETTINGS
The settings used when displaying the related Option.
Constructor Summary
OptionException(Option option)
Creates a new OptionException.
OptionException(Option option, String messageKey)
Creates a new OptionException.
OptionException(Option option, String messageKey, String value)
Creates a new OptionException.
Method Summary
StringgetMessage()
Return the exception message.
OptiongetOption()
Gets the Option the exception relates to

Field Detail

HELP_SETTINGS

public static final Set HELP_SETTINGS
The settings used when displaying the related Option.

See Also: DisplaySetting

Constructor Detail

OptionException

public OptionException(Option option)
Creates a new OptionException.

Parameters: option the Option the exception relates to

OptionException

public OptionException(Option option, String messageKey)
Creates a new OptionException.

Parameters: option the Option the exception relates to messageKey the id of the message to display

OptionException

public OptionException(Option option, String messageKey, String value)
Creates a new OptionException.

Parameters: option the Option the exception relates to messageKey the id of the message to display value a value to display with the message

Method Detail

getMessage

public String getMessage()
Return the exception message.

Returns: the exception message

getOption

public Option getOption()
Gets the Option the exception relates to

Returns: The related Option