ExceptionUnwrapper (Oracle - Berkeley DB Java API)
Date: 2020-06-01

Package com.sleepycat.util

## Class ExceptionUnwrapper

- java.lang.Object
- - com.sleepycat.util.ExceptionUnwrapper

-     public class ExceptionUnwrapper
      extends java.lang.Object

  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
    Constructor | Description
    --- | ---
    `ExceptionUnwrapper()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static java.lang.Exception` | `unwrap​(java.lang.Exception e)` | Unwraps an Exception and returns the underlying Exception, or throws an Error if the underlying Throwable is an Error.
    `static java.lang.Throwable` | `unwrapAny​(java.lang.Throwable e)` | Unwraps an Exception and returns the underlying Throwable.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExceptionUnwrapper

          public ExceptionUnwrapper()

  - ### Method Detail

    - #### unwrap

          public static java.lang.Exception unwrap​(java.lang.Exception e)

      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:
        `java.lang.Error` - if the underlying Throwable is an Error.
        `java.lang.IllegalArgumentException` - if the underlying Throwable is not an Exception or an Error.

    - #### unwrapAny

          public static java.lang.Throwable unwrapAny​(java.lang.Throwable e)

      Unwraps an Exception and returns the underlying Throwable.
      Parameters:
        `e` - is the Exception to unwrap.
      Returns:
        the underlying Throwable.

Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.