/** * Creates an Errors.Handling which passes any exceptions it receives * to the given handler. * <p> * The handler is free to throw a RuntimeException if it wants to. If it always * throws a RuntimeException, then you should instead create an Errors.Rethrowing * using {@link #createRethrowing}. */ public static Handling createHandling(Consumer<Throwable> handler) { return new Handling(handler); }
/** * Creates an Errors.Handling which passes any exceptions it receives * to the given handler. * <p> * The handler is free to throw a RuntimeException if it wants to. If it always * throws a RuntimeException, then you should instead create an Errors.Rethrowing * using {@link #createRethrowing}. */ public static Handling createHandling(Consumer<Throwable> handler) { return new Handling(handler); }
/** * Creates an Errors.Handling which passes any exceptions it receives * to the given handler. * <p> * The handler is free to throw a RuntimeException if it wants to. If it always * throws a RuntimeException, then you should instead create an Errors.Rethrowing * using {@link #createRethrowing}. */ public static Handling createHandling(Consumer<Throwable> handler) { return new Handling(handler); }