55 references to TrySetException
mscorlib (1)
system\threading\Tasks\TaskCompletionSource.cs (1)
246
if (!
TrySetException
(exception))
System (7)
net\System\Net\mail\SmtpClient.cs (1)
757
if (e.Error != null) tcs.
TrySetException
(e.Error);
net\System\Net\NetworkInformation\ping.cs (1)
571
if (e.Error != null) tcs.
TrySetException
(e.Error);
net\System\Net\webclient.cs (1)
2916
if (e.Error != null) tcs.
TrySetException
(e.Error);
net\System\Net\WebSockets\WebSocketConnectionStream.cs (2)
908
thisPtr.m_WriteTaskCompletionSource.
TrySetException
(new SocketException(eventArgs.SocketError));
941
thisPtr.m_ReadTaskCompletionSource.
TrySetException
(new SocketException(eventArgs.SocketError));
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (2)
798
thisPtr.m_WriteTaskCompletionSource.
TrySetException
(eventArgs.Exception);
828
thisPtr.m_ReadTaskCompletionSource.
TrySetException
(eventArgs.Exception);
System.Data (41)
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (2)
274
retry.
TrySetException
(ADP.ExceptionWithStackTrace(ADP.NonPooledOpenTimeout()));
276
retry.
TrySetException
(task.Exception.InnerException);
fx\src\data\System\Data\ProviderBase\DbConnectionPool.cs (2)
1148
next.Completion.
TrySetException
(caughtException);
1151
next.Completion.
TrySetException
(ADP.ExceptionWithStackTrace(ADP.PooledOpenTimeout()));
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (8)
2040
source.
TrySetException
(ex);
2216
source.
TrySetException
(ex);
2274
source.
TrySetException
(ex);
2328
source.
TrySetException
(ex);
2375
source.
TrySetException
(ex);
2541
source.
TrySetException
(ex);
2651
source.
TrySetException
(ex);
2712
source.
TrySetException
(ex);
fx\src\data\System\Data\SqlClient\SqlCommand.cs (12)
1832
completion.
TrySetException
(e);
1837
completion.
TrySetException
(e);
1843
completion.
TrySetException
(e);
1853
completion.
TrySetException
(e);
2213
globalCompletion.
TrySetException
(tsk.Exception.InnerException);
2259
globalCompletion.
TrySetException
(e);
2276
globalCompletion.
TrySetException
(retryTsk.Exception.InnerException);
2287
globalCompletion.
TrySetException
(e2);
2329
completion.
TrySetException
(e);
2334
completion.
TrySetException
(e);
2340
completion.
TrySetException
(e);
2350
completion.
TrySetException
(e);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (6)
1102
networkPacketTaskSource.
TrySetException
(ADP.ClosedConnectionError());
4571
source.
TrySetException
(ADP.ExceptionWithStackTrace(ADP.ClosedConnectionError()));
4579
exceptionSource.
TrySetException
(retryTask.Exception.InnerException);
4638
source.
TrySetException
(e.InnerException);
4641
source.
TrySetException
(e);
4664
source.
TrySetException
(e);
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (1)
257
completion.
TrySetException
(ex);
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (1)
261
completion.
TrySetException
(ex);
fx\src\data\System\Data\SqlClient\SqlUtil.cs (2)
73
completion.
TrySetException
(exc);
173
completion.
TrySetException
(exc());
fx\src\data\System\Data\SqlClient\TdsParser.cs (1)
1288
taskSource.
TrySetException
(ADP.ExceptionWithStackTrace(exception));
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (6)
2019
taskSource.
TrySetException
(ADP.ExceptionWithStackTrace(ADP.ClosedConnectionError()));
2024
taskSource.
TrySetException
(ADP.ExceptionWithStackTrace(ADP.ClosedConnectionError()));
2087
if (source.
TrySetException
(ex)) {
2536
if (source.
TrySetException
(ex)) {
2571
writeCompletionSource.
TrySetException
(e);
2584
writeCompletionSource.
TrySetException
(delayedException);
System.ServiceModel (1)
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
294
tcsObj.
TrySetException
(antecedent.Exception.InnerException);
System.ServiceModel.Discovery (1)
System\ServiceModel\Discovery\DiscoveryClient.cs (1)
1423
this.taskCompletionSource.
TrySetException
(error);
System.Web (4)
AspNetSynchronizationContextBase.cs (1)
52
tcs.
TrySetException
(ex);
WebSockets\WebSocketPipe.cs (3)
52
tcs.
TrySetException
(ex); // exceptional completion
95
tcs.
TrySetException
(ex); // exceptional completion
153
tcs.
TrySetException
(ex); // exceptional completion