org.biojava.utils
Class NestedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.biojava.utils.NestedException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- BioException, ChangeVetoException, ParserException, RegistryException
- 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.
- Author:
- Matthew Pocock
- See Also:
- Serialized Form
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 |
NestedException
public NestedException(java.lang.String message)
NestedException
public NestedException(java.lang.Throwable ex)
NestedException
public NestedException(java.lang.Throwable ex,
java.lang.String message)
NestedException
public NestedException()
printStackTrace
public void printStackTrace()
printStackTrace
public void printStackTrace(java.io.PrintStream ps)
printStackTrace
public void printStackTrace(java.io.PrintWriter pw)