completeExceptionally

fun completeExceptionally(ex: Throwable): Boolean

If not already completed, causes invocations of get and related methods to throw the given exception.

Return

true if this invocation caused this CompletableFuture to transition to a completed state, else false

Parameters

ex

the exception