name.kevinlocke.ultragetopt
Class ExtraArgumentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by name.kevinlocke.ultragetopt.CommandLineException
              extended by name.kevinlocke.ultragetopt.ExtraArgumentException
All Implemented Interfaces:
java.io.Serializable

public class ExtraArgumentException
extends CommandLineException

Exception signaling that an option which does not take an argument was given an argument. Normally, if an option which does not take an argument is followed by an argument that argument will be interpreted as a non-option argument and no exception will occur. However, if an option which does not take an argument is assigned an argument (connected by an assigner character), then this exception will occur.

Author:
Kevin Locke <kwl7@cornell.edu>
See Also:
Serialized Form

Constructor Summary
ExtraArgumentException(GetoptErrorFormatter formatter, char option, java.lang.String leaders)
          Create a new extra argument exception with a message generated by a given formatter.
ExtraArgumentException(GetoptErrorFormatter formatter, java.lang.String option, java.lang.String leaders)
          Create a new extra argument exception with a message generated by a given formatter.
ExtraArgumentException(java.lang.String message)
          Create a new extra argument exception with the given error message.
 
Method Summary
 
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
 

Constructor Detail

ExtraArgumentException

public ExtraArgumentException(java.lang.String message)
Create a new extra argument exception with the given error message.

Parameters:
message - the error message indicating the cause of this exception

ExtraArgumentException

public ExtraArgumentException(GetoptErrorFormatter formatter,
                              java.lang.String option,
                              java.lang.String leaders)
Create a new extra argument exception with a message generated by a given formatter.

Parameters:
formatter - the formatter to use for generating the error message
option - the option which was given an extra argument
leaders - the leader characters for that option

ExtraArgumentException

public ExtraArgumentException(GetoptErrorFormatter formatter,
                              char option,
                              java.lang.String leaders)
Create a new extra argument exception with a message generated by a given formatter.

Parameters:
formatter - the formatter to use for generating the error message
option - the option which was given an extra argument
leaders - the leader characters for that option