completeExceptionally

abstract fun completeExceptionally(
    exception: Throwable
): Boolean
(source)

Completes this deferred value exceptionally with a given exception. The result is true if this deferred was completed as a result of this invocation and false otherwise (if it was already completed).

Repeated invocations of this function have no effect and always produce false.