Freigeben über


CompletableFuture.CompleteExceptionally(Throwable) Method

Definition

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

[Android.Runtime.Register("completeExceptionally", "(Ljava/lang/Throwable;)Z", "GetCompleteExceptionally_Ljava_lang_Throwable_Handler", ApiSince=24)]
public virtual bool CompleteExceptionally (Java.Lang.Throwable? ex);
[<Android.Runtime.Register("completeExceptionally", "(Ljava/lang/Throwable;)Z", "GetCompleteExceptionally_Ljava_lang_Throwable_Handler", ApiSince=24)>]
abstract member CompleteExceptionally : Java.Lang.Throwable -> bool
override this.CompleteExceptionally : Java.Lang.Throwable -> bool

Parameters

ex
Throwable

the exception

Returns

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

Attributes

Remarks

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

Java documentation for java.util.concurrent.CompletableFuture.completeExceptionally(java.lang.Throwable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to