24 references to TrySetException
System.Private.CoreLib (24)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
522task.TrySetException(exception);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
217localThis.m_completionState.TrySetException(exceptions) :
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
2955if (thisRef.TrySetException(new TimeoutException())) 3002TaskStatus.Faulted => TrySetException(completingTask.GetExceptionDispatchInfos()), 5512bool succeeded = task.TrySetException(exception); 5526bool succeeded = task.TrySetException(exception); 6271TrySetException(observedExceptions); 6543TrySetException(observedExceptions); 7607result = TrySetException(edis);
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\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\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\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (2)
300vtst.TrySetException(exc); 731vtst.TrySetException(exc);
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (3)
548TrySetException(ex); 769task.TrySetException(ex); 781task.TrySetException(ex);