org.biojava.utils
Class NestedError

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Error
          extended byorg.biojava.utils.NestedError
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BioError

public class NestedError
extends java.lang.Error

A general purpose Error that can wrap another Throwable object.

NestedError is an Error that should be thrown whenever some exceptional and unforseable event takes place. For example, sometimes exceptions can be thrown by a given method, but not when the calling method is a member of the same class. In this case, the try-catch block would collect the 'impossible' exception and throw a NestedError that wraps it.

Author:
Matthew Pocock
See Also:
Serialized Form

Constructor Summary
NestedError()
           
NestedError(java.lang.String message)
           
NestedError(java.lang.Throwable ex)
           
NestedError(java.lang.Throwable ex, java.lang.String message)
           
 
Method Summary
 java.lang.Throwable getWrappedException()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedError

public NestedError(java.lang.String message)

NestedError

public NestedError(java.lang.Throwable ex)

NestedError

public NestedError(java.lang.Throwable ex,
                   java.lang.String message)

NestedError

public NestedError()
Method Detail

getWrappedException

public java.lang.Throwable getWrappedException()

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream ps)

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)