TaskCompletionSource.TrySetException Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
|
TrySetException(IEnumerable |
Attempts to transition the underlying Task |
| TrySetException(Exception) |
Attempts to transition the underlying Task |
TrySetException(IEnumerable)
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
public:
bool TrySetException(System::Collections::Generic::IEnumerable ^ exceptions);
public bool TrySetException(System.Collections.Generic.IEnumerable exceptions);
member this.TrySetException : seq -> bool
Public Function TrySetException (exceptions As IEnumerable(Of Exception)) As Boolean
Parameters
- exceptions
- IEnumerable<Exception>
The collection of exceptions to bind to this Task
Returns
true if the operation was successful; otherwise, false.
Exceptions
The Task was disposed.
The exceptions argument is null.
There are one or more null elements in exceptions.
-or-
The exceptions collection is empty.
Remarks
This operation will return false if the Task
See also
Applies to
TrySetException(Exception)
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
public:
bool TrySetException(Exception ^ exception);
public bool TrySetException(Exception exception);
member this.TrySetException : Exception -> bool
Public Function TrySetException (exception As Exception) As Boolean
Parameters
Returns
true if the operation was successful; otherwise, false.
Exceptions
The Task was disposed.
The exception argument is null.
Remarks
This operation will return false if the Task