public static <T> ObjDoubleConsumer<T> objDoubleConsumer(CheckedObjDoubleConsumer<T> consumer, Consumer<Throwable> handler) {
        return (t, u) -> {
            try {
                consumer.accept(t, u);
            }
            catch (Throwable e) {
                handler.accept(e);

                throw new IllegalStateException("Exception handler must throw a RuntimeException", e);
            }
        };
    }
public static < T > ObjDoubleConsumer < T > objDoubleConsumer ( CheckedObjDoubleConsumer < T > consumer , Consumer < Throwable > handler ) { return ( t , u ) -> { try { consumer . accept ( t , u ) ; } catch ( Throwable e ) { handler . accept ( e ) ; throw new IllegalStateException ( "Exception handler must throw a RuntimeException" , e ) ; } } ; }
Wrap a {@link CheckedObjDoubleConsumer} in a {@link ObjDoubleConsumer} with a custom handler for checked exceptions.