static <T, E extends Throwable> Consumer<T> unchecked(final ThrowingConsumer<T, E> consumer) {
        return (t) -> {
            try {
                consumer.accept(t);
            } catch (Throwable e) {
                if (e instanceof IOException ioe) {
                    throw new UncheckedIOException(ioe);
                } else {
                    throw new RuntimeException(e);
                }
            }
        };
    }
Wraps a consumer 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/ThrowingConsumer.java