Share via


CompletableFuture.ObtrudeException(Throwable) Method

Definition

Forcibly causes subsequent invocations of method #get() and related methods to throw the given exception, whether or not already completed.

[Android.Runtime.Register("obtrudeException", "(Ljava/lang/Throwable;)V", "GetObtrudeException_Ljava_lang_Throwable_Handler", ApiSince=24)]
public virtual void ObtrudeException (Java.Lang.Throwable? ex);
[<Android.Runtime.Register("obtrudeException", "(Ljava/lang/Throwable;)V", "GetObtrudeException_Ljava_lang_Throwable_Handler", ApiSince=24)>]
abstract member ObtrudeException : Java.Lang.Throwable -> unit
override this.ObtrudeException : Java.Lang.Throwable -> unit

Parameters

ex
Throwable

the exception

Attributes

Remarks

Forcibly causes subsequent invocations of method #get() and related methods to throw the given exception, whether or not already completed. This method is designed for use only in error recovery actions, and even in such situations may result in ongoing dependent completions using established versus overwritten outcomes.

Java documentation for java.util.concurrent.CompletableFuture.obtrudeException(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