CompletableFuture.ExceptionallyCompose(IFunction) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a dependent future that can recover from a failed completion by following another stage.
[Android.Runtime.Register("exceptionallyCompose", "(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;", "GetExceptionallyCompose_Ljava_util_function_Function_Handler", ApiSince=34)]
public virtual Java.Util.Concurrent.ICompletionStage? ExceptionallyCompose(Java.Util.Functions.IFunction? fn);
[<Android.Runtime.Register("exceptionallyCompose", "(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;", "GetExceptionallyCompose_Ljava_util_function_Function_Handler", ApiSince=34)>]
abstract member ExceptionallyCompose : Java.Util.Functions.IFunction -> Java.Util.Concurrent.ICompletionStage
override this.ExceptionallyCompose : Java.Util.Functions.IFunction -> Java.Util.Concurrent.ICompletionStage
Parameters
- fn
- IFunction
The function that receives the failed completion's exception and supplies a recovery stage.
Returns
A dependent future that receives the original successful value or follows the completion of the stage supplied by fn.
Implements
- Attributes
Remarks
The recovery function is not called when this future completes successfully. If recovery is needed, the dependent future follows the returned stage's value or failure. If the function throws, the dependent future completes exceptionally.