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