Package com.complexible.common.base

# Class Exceptions

java.lang.Object
com.complexible.common.base.Exceptions

public final class Exceptions extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T extends Throwable>
  RuntimeException`
  `rethrowChecked(Exception e)`
  Rethrow a checked exception without wrapping into an unchecked exception, bypassing the Java compiler's checks.

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

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

- ## Method Details

  - ### rethrowChecked

    public static <T extends Throwable> RuntimeException rethrowChecked(Exception e) throws T
    Rethrow a checked exception without wrapping into an unchecked exception, bypassing the Java compiler's checks. This method is particularly useful in lambdas, which are defined not throwing any checked exceptions, e. g. `Map.compute(Object, BiFunction)`. This method will never return anything, it will just throw the exception that was passed to it as an argument. This method is defined to return RuntimeException to allow the following code: ... catch (IOException e) { throw Exceptions.rethrowChecked(e); }
    Throws:
      `T`