Class CheckedExceptionWrapper

All Implemented Interfaces:
Serializable

public class CheckedExceptionWrapper extends RuntimeException
Wraps checked exceptions so they can be thrown across API methods that don't declare them.
See Also:
  • Constructor Details

    • CheckedExceptionWrapper

      public CheckedExceptionWrapper(Exception exception)
      Constructor.
      Parameters:
      exception - the checked exception to wrap
      Throws:
      IllegalArgumentException - if exception is null
  • Method Details

    • getException

      public Exception getException()
      Get the wrapped exception.
      Returns:
      the wrapped checked exception
    • throwException

      public void throwException() throws Exception
      Throw the wrapped exception.
      Throws:
      Exception - always