/** * Execute the given action before throwing the exception. * * @param action Action to execute. * @param <V1> Input type. * @return A new consumer with a listener action. */ default <V1 extends V> Consumer<V1> onFailure(java.util.function.Consumer<Throwable> action) { return onFailure(Throwable.class, action); }