Package com.sleepycat.util

## Class RuntimeExceptionWrapper

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.sleepycat.util.RuntimeExceptionWrapper

- All Implemented Interfaces:
    `ExceptionWrapper`, `java.io.Serializable`

      public class RuntimeExceptionWrapper
      extends java.lang.RuntimeException
      implements ExceptionWrapper

  A RuntimeException that can contain nested exceptions.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RuntimeExceptionWrapper​(java.lang.Throwable e)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Throwable` | `getDetail()` | Deprecated. replaced by `Throwable.getCause()`.
    `static java.lang.RuntimeException` | `wrapIfNeeded​(java.lang.Throwable e)` | Wraps the given exception if it is not a `RuntimeException`.

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

    - ### Methods inherited from interface com.sleepycat.util.ExceptionWrapper

      `getCause`

- - ### Constructor Detail

    - #### RuntimeExceptionWrapper

          public RuntimeExceptionWrapper​(java.lang.Throwable e)

  - ### Method Detail

    - #### wrapIfNeeded

          public static java.lang.RuntimeException wrapIfNeeded​(java.lang.Throwable e)

      Wraps the given exception if it is not a `RuntimeException`.
      Parameters:
        `e` - any exception.
      Returns:
        `e` if it is a `RuntimeException`, otherwise a `RuntimeExceptionWrapper` for `e`.

    - #### getDetail

          @Deprecated
          public java.lang.Throwable getDetail()

      Deprecated.
      replaced by `Throwable.getCause()`.
      Description copied from interface: `ExceptionWrapper`
      Returns the nested exception or null if none is present.
      Specified by:
        `getDetail` in interface `ExceptionWrapper`
      Returns:
        the nested exception or null if none is present.

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