code: public CompletableFuture<T> exceptAsync(Consumer<Throwable> consumer) {
      return whenCompleteAsync((result, error) -> {
        if (error != null) {
          consumer.accept(error);
        }
      });
    }
docs: Sets a consumer to be called asynchronously when the future is failed.
  
  @param consumer The consumer to call.
  @return A new future.