21 references to TrySetException
System.Private.CoreLib (21)
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\FutureFactory.cs (4)
524promise.TrySetException(ex); 675catch (Exception e) { promise.TrySetException(e); } // catch and log any scheduler exceptions 685catch (Exception e) { promise.TrySetException(e); } // catch and log any scheduler exceptions 1314successfullySet = TrySetException(exc);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
2875if (thisRef.TrySetException(new TimeoutException())) 2922TaskStatus.Faulted => TrySetException(completingTask.GetExceptionDispatchInfos()), 5400bool succeeded = task.TrySetException(exception); 5414bool succeeded = task.TrySetException(exception); 6137TrySetException(observedExceptions); 6407TrySetException(observedExceptions); 7458result = 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\ValueTask.cs (2)
276vtst.TrySetException(exc); 682vtst.TrySetException(exc);