org.kohsuke.args4j
Class IllegalOptionParameterException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.kohsuke.args4j.CmdLineException
              extended by org.kohsuke.args4j.IllegalOptionParameterException
All Implemented Interfaces:
java.io.Serializable

public class IllegalOptionParameterException
extends CmdLineException

Signals an error in a parameter of an option.

The Throwable.getMessage() method returns a human-readable localized description of the error message.

Author:
Kohsuke Kawaguchi (kk@kohsuke.org)
See Also:
Serialized Form

Field Summary
private  java.lang.String optionName
           
private  java.lang.String value
           
 
Constructor Summary
IllegalOptionParameterException(java.lang.String optionName, java.lang.String value)
           
 
Method Summary
 java.lang.String getOptionName()
          Returns the name of the option that caused a problem.
 java.lang.String getValue()
          Returns the parameter of the option that caused a problem.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

optionName

private java.lang.String optionName

value

private java.lang.String value
Constructor Detail

IllegalOptionParameterException

public IllegalOptionParameterException(java.lang.String optionName,
                                       java.lang.String value)
Parameters:
optionName - The name of the option whose parameter has a problem.
value - The token that is causing the problem.
Method Detail

getOptionName

public java.lang.String getOptionName()
Returns the name of the option that caused a problem.

Returns:
For example, if the command line is "-n abc" where the "-n" option expects a number, then this method returns "-n".

getValue

public java.lang.String getValue()
Returns the parameter of the option that caused a problem.

Returns:
For example, if the command line is "-n abc" where the "-n" option expects a number, then this method returns "abc".


Copyright © 2003 Kohsuke Kawaguchi. All Rights Reserved.