org.jscience.util
Class NestedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jscience.util.NestedException
All Implemented Interfaces:
java.io.Serializable

public class NestedException
extends java.lang.Exception

A general perpose Exception that can wrap another exception.

It is common practice in BioJava to throw a NestedException or a subclass of it when something goes wrong. The exception can be used to catch another throwable, thus keeping a complete record of where the original error originated while adding annotation to the stack-trace. It also affords a neat way to avoid exception-bloat on method calls, particularly when objects are composed from several objects from different packages.

See Also:
Serialized Form

Constructor Summary
NestedException()
          Creates a new NestedException object.
NestedException(java.lang.String message)
          Creates a new NestedException object.
NestedException(java.lang.Throwable ex)
          Creates a new NestedException object.
NestedException(java.lang.Throwable ex, java.lang.String message)
          Creates a new NestedException object.
 
Method Summary
 void printStackTrace()
          DOCUMENT ME!
 void printStackTrace(java.io.PrintStream ps)
          DOCUMENT ME!
 void printStackTrace(java.io.PrintWriter pw)
          DOCUMENT ME!
 
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

NestedException

public NestedException(java.lang.String message)
Creates a new NestedException object.

Parameters:
message - DOCUMENT ME!

NestedException

public NestedException(java.lang.Throwable ex)
Creates a new NestedException object.

Parameters:
ex - DOCUMENT ME!

NestedException

public NestedException(java.lang.Throwable ex,
                       java.lang.String message)
Creates a new NestedException object.

Parameters:
ex - DOCUMENT ME!
message - DOCUMENT ME!

NestedException

public NestedException()
Creates a new NestedException object.

Method Detail

printStackTrace

public void printStackTrace()
DOCUMENT ME!

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
DOCUMENT ME!

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
ps - DOCUMENT ME!

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
DOCUMENT ME!

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
pw - DOCUMENT ME!