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