public static <R, T extends IOException> R uncheckAndIgnore(SupplierThrowingIOException<R> supplier, Class<T> exceptionToIgnore) {
        try {
            return supplier.get();
        } catch (UncheckedIOException e) {
            IOException cause = e.getCause();
            if (cause == null) throw e;
            try {
                cause.getClass().asSubclass(exceptionToIgnore);
            } catch (ClassCastException f) {
                throw e;
            }
            return null;
        } catch (IOException e) {
            try {
                e.getClass().asSubclass(exceptionToIgnore);
            } catch (ClassCastException f) {
                throw new UncheckedIOException(e);
            }
            return null;
        }
    }
Similar to uncheck(), except null is returned if exceptionToIgnore is thrown.
vespajlib/src/main/java/com/yahoo/yolean/Exceptions.java