public static <T, U, R> BiFunction<T, U, R> biFunction(CheckedBiFunction<T, U, R> function, Consumer<Throwable> handler) {
        return (t, u) -> {
            try {
                return function.apply(t, u);
            }
            catch (Throwable e) {
                handler.accept(e);

                throw new IllegalStateException("Exception handler must throw a RuntimeException", e);
            }
        };
    }
Wrap a {@link CheckedBiFunction} in a {@link BiFunction} with a custom handler for checked exceptions.
<p>
Example:
<pre><code>
map.computeIfPresent("key", Unchecked.biFunction(
    (k, v) -> {
        if (k == null || v == null)
            throw new Exception("No nulls allowed in map");

        return 42;
    },
    e -> {
        throw new IllegalStateException(e);
    }
));
</code></pre>
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java