/** * Apply this function and run the given action in case of exception. * * @param action Action to run when exception occurs. * @return A new function. */ default Function4<V1, V2, V3, V4, R> onFailure(java.util.function.Consumer<Throwable> action) { return onFailure(Throwable.class, action); }