Handy class for wrapping checked Exceptions with a root cause.
This time-honored technique is no longer necessary in Java 1.4, which
finally provides built-in support for exception nesting. Thus exceptions in
applications written to use Java 1.4 need not extend this class. To ease
migration, this class mirrors Java 1.4's nested exceptions as closely as possible.
Abstract to force the programmer to extend the class. getMessage
will include nested exception information; printStackTrace etc will
delegate to the wrapped exception, if any.
The similarity between this class and the NestedRuntimeException class is
unavoidable, as Java forces these two classes to have different superclasses
(ah, the inflexibility of concrete inheritance!).
author: kimchy See Also: NestedCheckedException.getMessage See Also: NestedCheckedException.printStackTrace See Also: NestedRuntimeException |