Language

FutureTask.ExceptionNow Method

Definition

Gets the exception stored by an already failed task.

[Android.Runtime.Register("exceptionNow", "()Ljava/lang/Throwable;", "GetExceptionNowHandler", ApiSince=36)]
public virtual Java.Lang.Throwable? ExceptionNow();
[<Android.Runtime.Register("exceptionNow", "()Ljava/lang/Throwable;", "GetExceptionNowHandler", ApiSince=36)>]
abstract member ExceptionNow : unit -> Java.Lang.Throwable
override this.ExceptionNow : unit -> Java.Lang.Throwable

Returns

The exception that caused the task to fail.

Implements

Attributes

Remarks

This method throws IllegalStateException if the task is incomplete, cancelled, or successfully completed.

Applies to