code: public static <T> void exceptionListener(CompletableFuture<T> completableFuture, Consumer<Throwable> exceptionListener) {
          completableFuture.whenComplete((r, ex) -> {
              if (ex != null) {
                  Callbacks.invokeSafely(exceptionListener, ex, null);
              }
          });
      }
docs: Registers an exception listener to the given CompletableFuture.
  
  @param completableFuture The Future to register to.
  @param exceptionListener The Listener to register.
  @param <T>               The Type of the future's result.