org.fhcrc.cpl.toolbox.commandline.arguments
Class ArgumentValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.fhcrc.cpl.toolbox.commandline.arguments.ArgumentValidationException
All Implemented Interfaces:
java.io.Serializable

public class ArgumentValidationException
extends java.lang.Exception

This class purely serves as a way to create a known type of Exception from a non-Exception event (like a String not conforming to a required format)

See Also:
Serialized Form

Field Summary
protected  java.lang.Exception mNestedException
           
protected  boolean mShouldShowStackTrace
           
 
Constructor Summary
ArgumentValidationException(java.lang.Exception e)
           
ArgumentValidationException(java.lang.String message)
           
ArgumentValidationException(java.lang.String message, boolean shouldShowStackTrace)
           
ArgumentValidationException(java.lang.String message, java.lang.Exception e)
           
 
Method Summary
 void setShouldShowStackTrace(boolean shouldShowStackTrace)
           
 boolean shouldShowStackTrace()
          Indicates whether stack trace should be shown.
 
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

mNestedException

protected java.lang.Exception mNestedException

mShouldShowStackTrace

protected boolean mShouldShowStackTrace
Constructor Detail

ArgumentValidationException

public ArgumentValidationException(java.lang.String message)

ArgumentValidationException

public ArgumentValidationException(java.lang.String message,
                                   boolean shouldShowStackTrace)

ArgumentValidationException

public ArgumentValidationException(java.lang.String message,
                                   java.lang.Exception e)

ArgumentValidationException

public ArgumentValidationException(java.lang.Exception e)
Method Detail

shouldShowStackTrace

public boolean shouldShowStackTrace()
Indicates whether stack trace should be shown. If we're getting an exception we don't understand, best to show stack trace. If, instead, it's something like a missing file, better to give a meaningful message and leave it at that.

Returns:

setShouldShowStackTrace

public void setShouldShowStackTrace(boolean shouldShowStackTrace)


Fred Hutchinson Cancer Research Center