TaskCompletionSource.TrySetException 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
TrySetException(IEnumerable<Exception>) | |
TrySetException(Exception) |
TrySetException(IEnumerable<Exception>)
public:
bool TrySetException(System::Collections::Generic::IEnumerable<Exception ^> ^ exceptions);
public bool TrySetException (System.Collections.Generic.IEnumerable<Exception> exceptions);
member this.TrySetException : seq<Exception> -> bool
Public Function TrySetException (exceptions As IEnumerable(Of Exception)) As Boolean
매개 변수
- exceptions
- IEnumerable<Exception>
이 Task에 바인딩할 예외 컬렉션입니다.
반환
작업이 성공적으로 수행되었으면 true
이고, 그렇지 않으면 false
입니다.
예외
exceptions
이(가) null
인 경우
exceptions
에 하나 이상의 null
요소가 있습니다.
exceptions
컬렉션이 비어 있는 경우
설명
이 작업은 세 가지 최종 상태 FaultedRanToCompletionCanceled중 하나인 경우 Task 반환 false
됩니다.
적용 대상
TrySetException(Exception)
public:
bool TrySetException(Exception ^ exception);
public bool TrySetException (Exception exception);
member this.TrySetException : Exception -> bool
Public Function TrySetException (exception As Exception) As Boolean
매개 변수
반환
작업이 성공적으로 수행되었으면 true
이고, 그렇지 않으면 false
입니다.
예외
exception
이(가) null
인 경우
설명
이 작업은 세 가지 최종 상태 FaultedRanToCompletionCanceled중 하나인 경우 Task 반환 false
됩니다.