net.walend.lang
Class NestedException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--net.walend.lang.NestedException
- All Implemented Interfaces:
- HasNestedThrowable, java.io.Serializable
- Direct Known Subclasses:
- DigraphException, LyophilException
- public abstract class NestedException
- extends java.lang.Exception
- implements HasNestedThrowable, java.io.Serializable
An abstract Exception that can contain other Throwables.
- Since:
- 20001121
- Author:
- David Walend
Field Summary |
private java.lang.Throwable |
nested
|
Fields inherited from class java.lang.Exception |
|
Fields inherited from class java.lang.Throwable |
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nested
private java.lang.Throwable nested
NestedException
public NestedException()
- Only use this constructor for Serialization.
NestedException
public NestedException(java.lang.String message)
NestedException
public NestedException(java.lang.Throwable nester)
NestedException
public NestedException(java.lang.String message,
java.lang.Throwable nester)
getMessage
public java.lang.String getMessage()
- Returns this exception's message, followed by the nested Throwable's message, surrounded by []'s.
- Overrides:
getMessage
in class java.lang.Throwable
getNestedThrowable
public java.lang.Throwable getNestedThrowable()
- Returns the nested Throwable, or null if there doesn't happent to be one.
- Specified by:
getNestedThrowable
in interface HasNestedThrowable
hasNestedThrowable
public boolean hasNestedThrowable()
- Specified by:
hasNestedThrowable
in interface HasNestedThrowable
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
printLimitedStackTrace
public void printLimitedStackTrace()
printLimitedStackTrace
public void printLimitedStackTrace(java.io.PrintStream ps)
- Description copied from interface:
HasNestedThrowable
- Print the stack trace of just this Throwable.
- Specified by:
printLimitedStackTrace
in interface HasNestedThrowable
printLimitedStackTrace
public void printLimitedStackTrace(java.io.PrintWriter pw)
- Description copied from interface:
HasNestedThrowable
- Print the stack trace of just this Throwable.
- Specified by:
printLimitedStackTrace
in interface HasNestedThrowable
Copyright (c) 2000, 2001, David Walend