35 references to SetCurrentStackTrace
System.Net.Http (10)
System\Net\Http\MessageProcessingHandler.cs (1)
80
sendState.TrySetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new InvalidOperationException(SR.net_http_handler_noresponse)));
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
847
ExceptionDispatchInfo.
SetCurrentStackTrace
(newException);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (1)
477
ExceptionDispatchInfo.
SetCurrentStackTrace
(hre);
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (2)
57
((CreditWaiter)s!)._source.SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new OperationCanceledException(cancellationToken)));
83
_source.SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(CreditManager), SR.net_http_disposed_while_in_use)));
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (4)
1469
thisRef._waitSource.SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(
1611
return ValueTask.FromException<int>(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http2ReadStream))));
1625
Http2Stream http2Stream = _http2Stream ?? throw ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http2ReadStream)));
1634
http2Stream is null ? Task.FromException<int>(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http2ReadStream)))) :
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (1)
174
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new IOException(SR.ObjectDisposed_StreamClosed)));
System.Net.Mail (4)
System\Net\Mail\SmtpClient.cs (4)
415
return (ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(typeof(SmtpClient).FullName)), true);
438
return (ExceptionDispatchInfo.
SetCurrentStackTrace
(new InvalidOperationException(SR.net_inasync)), true);
554
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new SmtpException(SR.net_timeout));
566
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new SmtpException(SR.SmtpSendMailFailure, e));
System.Net.Quic (13)
src\libraries\Common\src\System\Net\StreamBuffer.cs (1)
327
_waitSource.SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new OperationCanceledException(cancellationToken)));
System\Net\Quic\Internal\ResettableValueTaskSource.cs (1)
178
exception = exception.StackTrace is null ? ExceptionDispatchInfo.
SetCurrentStackTrace
(exception) : exception;
System\Net\Quic\Internal\ValueTaskSource.cs (1)
119
exception = exception.StackTrace is null ? ExceptionDispatchInfo.
SetCurrentStackTrace
(exception) : exception;
System\Net\Quic\QuicConnection.cs (4)
653
Exception exception = ExceptionDispatchInfo.
SetCurrentStackTrace
(ThrowHelper.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode));
665
Exception exception = ExceptionDispatchInfo.
SetCurrentStackTrace
(ThrowHelper.GetConnectionAbortedException((long)data.ErrorCode));
679
Exception exception = ExceptionDispatchInfo.
SetCurrentStackTrace
(_disposed ? new ObjectDisposedException(GetType().FullName) : ThrowHelper.GetOperationAbortedException());
862
_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(GetType().FullName)));
System\Net\Quic\QuicListener.cs (3)
276
Exception ex = ExceptionDispatchInfo.
SetCurrentStackTrace
(new QuicException(QuicError.ConnectionTimeout, null, SR.Format(SR.net_quic_handshake_timeout, handshakeTimeout), oce));
315
ExceptionDispatchInfo.
SetCurrentStackTrace
(new QuicException(QuicError.CallbackError, null, SR.net_quic_callback_error, ex)) :
430
_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(GetType().FullName)));
System\Net\Quic\QuicStream.cs (3)
364
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(QuicStream))));
369
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new InvalidOperationException(SR.net_quic_writing_notallowed)));
387
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "write"))));
System.Net.Requests (1)
System\Net\FtpWebRequest.cs (1)
922
SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new WebException(SR.net_timeout, WebExceptionStatus.Timeout)));
System.Net.Security (1)
System\Net\Security\SslStream.IO.cs (1)
655
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status))));
System.Net.Sockets (2)
System\Net\Sockets\Socket.Tasks.cs (2)
925
Exception e = ExceptionDispatchInfo.
SetCurrentStackTrace
(new SocketException((int)error));
1395
e = ExceptionDispatchInfo.
SetCurrentStackTrace
(e);
System.Net.WebSockets (2)
System\Net\WebSockets\ManagedWebSocket.cs (1)
1013
inner = ExceptionDispatchInfo.
SetCurrentStackTrace
(
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
81
Exception exc = ExceptionDispatchInfo.
SetCurrentStackTrace
(
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
1184
return Task.FromException<byte[]>(ExceptionDispatchInfo.
SetCurrentStackTrace
(new IOException(SR.IO_FileTooLong2GB)));
src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (1)
254
_mrvtsc.SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new OperationCanceledException(cancellationToken)));