Class ExceptionUtil

java.lang.Object
com.denodo.util.exceptions.ExceptionUtil

public final class ExceptionUtil extends Object
From 'Java Concurrency in Practice': Coerce an unchecked Throwable to a RuntimeException. If the Throwable is an Error, throw it; if it is a RuntimeException return it, otherwise throw IllegalStateException.
  • Method Details

    • launderThrowable

      public static RuntimeException launderThrowable(Throwable t)
      From 'Java Concurrency in Practice': Coerce an unchecked Throwable to a RuntimeException. If the Throwable is an Error, throw it; if it is a RuntimeException return it, otherwise throw IllegalStateException.