Package com.sleepycat.util
Class ExceptionUnwrapper
java.lang.Object
com.sleepycat.util.ExceptionUnwrapper
Unwraps nested exceptions by calling the
ExceptionWrapper.getCause() method for exceptions that implement the
ExceptionWrapper interface. Does not currently support the Java 1.4
Throwable.getCause() method.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ExceptionUnwrapper
public ExceptionUnwrapper()
-
-
Method Details
-
unwrap
Unwraps an Exception and returns the underlying Exception, or throws an Error if the underlying Throwable is an Error.- Parameters:
e- is the Exception to unwrap.- Returns:
- the underlying Exception.
- Throws:
Error- if the underlying Throwable is an Error.IllegalArgumentException- if the underlying Throwable is not an Exception or an Error.
-
unwrapAny
Unwraps an Exception and returns the underlying Throwable.- Parameters:
e- is the Exception to unwrap.- Returns:
- the underlying Throwable.
-