Top Description Fields Constructors Methods
org.kohsuke.args4j

public Class CmdLineException

extends Exception
Class Inheritance
Imports
java.util.Locale, org.kohsuke.args4j.spi.OptionHandler

Signals an error in the user input.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private String
localizedMessage

The optional localized message.

private CmdLineParser
private static final long

Constructor Summary

AccessConstructor and Description
public
public
public
public
public
public
public

Method Summary

Modifier and TypeMethod and Description
public String
getLocalizedMessage()

Overrides java.lang.Throwable.getLocalizedMessage.

Creates a localized description of this throwable.

public CmdLineParser
getParser()

Obtains the CmdLineParser that triggered an exception.

Field Detail

localizedMessageback to summary
private String localizedMessage

The optional localized message.

See Also
Throwable#getLocalizedMessage()
parserback to summary
private CmdLineParser parser
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

CmdLineExceptionback to summary
public CmdLineException(String message)
CmdLineExceptionback to summary
public CmdLineException(String message, Throwable cause)
CmdLineExceptionback to summary
public CmdLineException(Throwable cause)
CmdLineExceptionback to summary
public CmdLineException(CmdLineParser parser, Localizable message, String... args)
CmdLineExceptionback to summary
public CmdLineException(CmdLineParser parser, String message)
CmdLineExceptionback to summary
public CmdLineException(CmdLineParser parser, String message, Throwable cause)
CmdLineExceptionback to summary
public CmdLineException(CmdLineParser parser, Throwable cause)

Method Detail

getLocalizedMessageback to summary
public String getLocalizedMessage()

Overrides java.lang.Throwable.getLocalizedMessage.

Doc from java.lang.Throwable.getLocalizedMessage.

Creates a localized description of this throwable. Subclasses may override this method in order to produce a locale-specific message. For subclasses that do not override this method, the default implementation returns the same result as getMessage().

Returns:String

The localized description of this throwable.

Annotations
@Override
getParserback to summary
public CmdLineParser getParser()

Obtains the CmdLineParser that triggered an exception.

Unless you have legacy OptionHandler that doesn't pass in this information when it throws an exception, this method should always return a non-null value.