static <T, R, E extends Throwable> Function<T, R> unchecked(final ThrowingFunction<T, R, E> f) {
        return t -> {
            try {
                return f.apply(t);
            } catch (Throwable e) {
                if (e instanceof IOException ioe) {
                    throw new UncheckedIOException(ioe);
                } else {
                    throw new RuntimeException(e);
                }
            }
        };
    }
Wraps a function that throws a checked exception with a catch block that will wrap
any thrown exception with a {@link RuntimeException}, thus making it unchecked and
usable in a lambda.
stroom-util/src/main/java/stroom/util/exception/ThrowingFunction.java