public class ExceptionUnwrapper extends Object
ExceptionWrapper.getCause()
method for exceptions that implement the
ExceptionWrapper
interface. Does not currently support the Java 1.4
Throwable.getCause()
method.Constructor and Description |
---|
ExceptionUnwrapper() |
Modifier and Type | Method and Description |
---|---|
static Exception |
unwrap(Exception e)
Unwraps an Exception and returns the underlying Exception, or throws an
Error if the underlying Throwable is an Error.
|
static Throwable |
unwrapAny(Throwable e)
Unwraps an Exception and returns the underlying Throwable.
|
public static Exception unwrap(Exception e)
e
- is the Exception to unwrap.Error
- if the underlying Throwable is an Error.IllegalArgumentException
- if the underlying Throwable is not an
Exception or an Error.Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.