AsyncTaskMethodBuilder<TResult>.SetException(Exception) Metoda
Definicja
Oznacza zadanie jako nieudane i wiąże określony wyjątek z zadaniem.Marks the task as failed and binds the specified exception to the task.
public:
void SetException(Exception ^ exception);
public void SetException (Exception exception);
member this.SetException : Exception -> unit
Parametry
- exception
- Exception
Wyjątek, który należy powiązać z zadaniem.The exception to bind to the task.
Wyjątki
exception
jest null
.exception
is null
.
Zadanie zostało już ukończone.The task has already completed.
Uwagi
Ten typ i jego elementy członkowskie są przeznaczone do użycia przez kompilator.This type and its members are intended for use by the compiler.