name.kevinlocke.ultragetopt
Class AmbiguousOptionException

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

public class AmbiguousOptionException
extends CommandLineException

Exception signaling that an option could be matched against multiple accepted options. This will occur if UltraGetopt is set to attempt partial matching of options and encounters an option which can be matched against multiple long options. For example, the option "-out" could be matched against the "--output" or "--outlet" options and there is no reasonable way to determine which option was intended.

Author:
Kevin Locke <kwl7@cornell.edu>
See Also:
UltraGetopt.Behavior.PARTIAL_MATCHING, Serialized Form

Constructor Summary
AmbiguousOptionException(GetoptErrorFormatter formatter, char option, java.lang.String leaders)
          Creates a new ambiguous option exception with a message generated by a given formatter.
AmbiguousOptionException(GetoptErrorFormatter formatter, java.lang.String option, java.lang.String leaders)
          Creates a new ambiguous option exception with a message generated by a given formatter.
AmbiguousOptionException(java.lang.String message)
          Creates a new ambiguous option 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

AmbiguousOptionException

public AmbiguousOptionException(java.lang.String message)
Creates a new ambiguous option exception with the given error message.

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

AmbiguousOptionException

public AmbiguousOptionException(GetoptErrorFormatter formatter,
                                java.lang.String option,
                                java.lang.String leaders)
Creates a new ambiguous option 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 ambiguous
leaders - the leader characters for that option

AmbiguousOptionException

public AmbiguousOptionException(GetoptErrorFormatter formatter,
                                char option,
                                java.lang.String leaders)
Creates a new ambiguous option 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 ambiguous
leaders - the leader characters for that option