code: public boolean completeExceptionally(Throwable ex) {
      boolean triggered = internalComplete(new AltResult(Objects.requireNonNull(ex)));
      postComplete();
      return triggered;
    }
docs: If not already completed, causes invocations of {@link #get()} and related methods to throw the
  given exception.
  
  @param ex the exception
  @return {@code true} if this invocation caused this CompletableFuture to transition to a
  completed state, else {@code false}