AsyncValueTaskMethodBuilder<TResult>.SetException(Exception) Method

Definition

Marks the task as failed and binds the specified exception to the task.

C#
public void SetException(Exception exception);

Parameters

exception
Exception

The exception to bind to the task.

Applies to

Produkt Versioner
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1