org.bdgp.util
Class NestedException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--org.bdgp.util.NestedException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- DataAdapterException
- 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
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, 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()
getSubThrowable
public java.lang.Throwable getSubThrowable()
printStackTrace
public void printStackTrace()
- Overrides:
printStackTrace
in class java.lang.Throwable
printStackTrace
public void printStackTrace(java.io.PrintStream ps)
- Overrides:
printStackTrace
in class java.lang.Throwable
printStackTrace
public void printStackTrace(java.io.PrintWriter pw)
- Overrides:
printStackTrace
in class java.lang.Throwable