public static <R> void doAndHandle(final CheckedConsumer<R> function) {
        try {
            function.accept(null);
        } catch (final Throwable e) {
            LoggingUtils.warn(LOGGER, e);
        }
    }
Do and handle.

@param <R>      the type parameter
@param function the function
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/function/FunctionUtils.java