Handy class for wrapping runtime Exceptions with a root cause.
This time-honoured 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 NestedCheckedException class is
unavoidable, as Java forces these two classes to have different superclasses
(ah, the inflexibility of concrete inheritance!).
author: kimchy See Also: NestedRuntimeException.getMessage See Also: NestedRuntimeException.printStackTrace See Also: NestedCheckedException |