다음을 통해 공유


TaskCompletionSource.SetException 메서드

정의

오버로드

SetException(IEnumerable<Exception>)

내부 TaskFaulted 상태로 전환합니다.

SetException(Exception)

내부 TaskFaulted 상태로 전환합니다.

SetException(IEnumerable<Exception>)

내부 TaskFaulted 상태로 전환합니다.

public:
 void SetException(System::Collections::Generic::IEnumerable<Exception ^> ^ exceptions);
public void SetException (System.Collections.Generic.IEnumerable<Exception> exceptions);
member this.SetException : seq<Exception> -> unit
Public Sub SetException (exceptions As IEnumerable(Of Exception))

매개 변수

exceptions
IEnumerable<Exception>

Task에 바인딩할 예외 컬렉션입니다.

예외

exceptions이(가) null인 경우

exceptions에 하나 이상의 null 요소가 있습니다.

기본 TaskRanToCompletion, Faulted 또는 Canceled의 세 가지 최종 상태 중 하나인 경우

적용 대상

SetException(Exception)

내부 TaskFaulted 상태로 전환합니다.

public:
 void SetException(Exception ^ exception);
public void SetException (Exception exception);
member this.SetException : Exception -> unit
Public Sub SetException (exception As Exception)

매개 변수

exception
Exception

Task에 바인딩할 예외입니다.

예외

exception이(가) null인 경우

기본 TaskRanToCompletion, Faulted 또는 Canceled의 세 가지 최종 상태 중 하나인 경우

적용 대상