public static <T extends IOException> void uncheckAndIgnore(RunnableThrowingIOException runnable, Class<T> exceptionToIgnore) {
        try {
            runnable.run();
        } catch (UncheckedIOException e) {
            IOException cause = e.getCause();
            if (cause == null) throw e;
            try {
                cause.getClass().asSubclass(exceptionToIgnore);
            } catch (ClassCastException f) {
                throw e;
            }
            // Do nothing - OK
        } catch (IOException e) {
            try {
                e.getClass().asSubclass(exceptionToIgnore);
            } catch (ClassCastException f) {
                throw new UncheckedIOException(e);
            }
            // Do nothing - OK
        }
    }
Similar to uncheck(), except an exceptionToIgnore exception is silently ignored.
vespajlib/src/main/java/com/yahoo/yolean/Exceptions.java