Udostępnij za pośrednictwem


CompletableFuture.FailedFuture(Throwable) Method

Definition

Returns a new CompletableFuture that is already completed exceptionally with the given exception.

[Android.Runtime.Register("failedFuture", "(Ljava/lang/Throwable;)Ljava/util/concurrent/CompletableFuture;", "", ApiSince=31)]
[Java.Interop.JavaTypeParameters(new System.String[] { "U" })]
public static Java.Util.Concurrent.CompletableFuture? FailedFuture (Java.Lang.Throwable? ex);
[<Android.Runtime.Register("failedFuture", "(Ljava/lang/Throwable;)Ljava/util/concurrent/CompletableFuture;", "", ApiSince=31)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "U" })>]
static member FailedFuture : Java.Lang.Throwable -> Java.Util.Concurrent.CompletableFuture

Parameters

ex
Throwable

the exception

Returns

the exceptionally completed CompletableFuture

Attributes

Remarks

Returns a new CompletableFuture that is already completed exceptionally with the given exception.

Added in 9.

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