/** * Creates an Errors.Rethrowing which transforms any exceptions it receives into a RuntimeException * as specified by the given function, and then throws that RuntimeException. * <p> * If that function happens to throw an unchecked error itself, that'll work just fine too. */ public static Rethrowing createRethrowing(Function<Throwable, RuntimeException> transform) { return new Rethrowing(transform); }
/** * Creates an Errors.Rethrowing which transforms any exceptions it receives into a RuntimeException * as specified by the given function, and then throws that RuntimeException. * <p> * If that function happens to throw an unchecked error itself, that'll work just fine too. */ public static Rethrowing createRethrowing(Function<Throwable, RuntimeException> transform) { return new Rethrowing(transform); }
/** * Creates an Errors.Rethrowing which transforms any exceptions it receives into a RuntimeException * as specified by the given function, and then throws that RuntimeException. * <p> * If that function happens to throw an unchecked error itself, that'll work just fine too. */ public static Rethrowing createRethrowing(Function<Throwable, RuntimeException> transform) { return new Rethrowing(transform); }