25 references to TrySetException
System.Private.CoreLib (25)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (4)
1001
TrySetException
(ex);
1131
TrySetException
(ex);
1353
task.
TrySetException
(ex);
1365
task.
TrySetException
(ex);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
714
task.
TrySetException
(exception);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
217
localThis.m_completionState.
TrySetException
(exceptions) :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
3031
if (thisRef.
TrySetException
(new TimeoutException()))
3078
TaskStatus.Faulted =>
TrySetException
(completingTask.GetExceptionDispatchInfos()),
5613
bool succeeded = task.
TrySetException
(exception);
5627
bool succeeded = task.
TrySetException
(exception);
6372
TrySetException
(observedExceptions);
6644
TrySetException
(observedExceptions);
7710
result =
TrySetException
(edis);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (3)
132
bool rval = _task.
TrySetException
(exception);
178
bool rval = _task.
TrySetException
(defensiveCopy);
345
result = _task.
TrySetException
(completedTask.GetExceptionDispatchInfos());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (3)
132
bool rval = _task.
TrySetException
(exception);
178
bool rval = _task.
TrySetException
(defensiveCopy);
343
result = _task.
TrySetException
(completedTask.GetExceptionDispatchInfos());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (4)
525
promise.
TrySetException
(ex);
676
catch (Exception e) { promise.
TrySetException
(e); } // catch and log any scheduler exceptions
688
catch (Exception e) { promise.
TrySetException
(e); } // catch and log any scheduler exceptions
1317
successfullySet =
TrySetException
(exc);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (2)
283
vtst.
TrySetException
(exc);
693
vtst.
TrySetException
(exc);