joptsimple
Class OptionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by joptsimple.OptionException
All Implemented Interfaces:
Serializable

public abstract class OptionException
extends RuntimeException

Thrown when a problem occurs during option parsing.

Version:
$Id: OptionException.java,v 1.21 2009/08/13 00:34:35 pholser Exp $
Author:
Paul Holser
See Also:
Serialized Form

Constructor Summary
protected OptionException(Collection<String> options)
           
protected OptionException(Collection<String> options, Throwable cause)
           
 
Method Summary
protected  String multipleOptionMessage()
           
 Collection<String> options()
          Gives the option being considered when the exception was created.
protected  String singleOptionMessage()
           
protected  String singleOptionMessage(String option)
           
 
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

OptionException

protected OptionException(Collection<String> options)

OptionException

protected OptionException(Collection<String> options,
                          Throwable cause)
Method Detail

options

public Collection<String> options()

Gives the option being considered when the exception was created.

Returns:
the option being considered when the exception was created

singleOptionMessage

protected final String singleOptionMessage()

singleOptionMessage

protected final String singleOptionMessage(String option)

multipleOptionMessage

protected final String multipleOptionMessage()


Copyright © 2011. All Rights Reserved.