64 references to SetCurrentStackTrace
System.Net.Http (30)
System\Net\Http\HttpContent.cs (2)
708
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new HttpRequestException(error, SR.net_http_content_stream_copy_error, e));
780
return (HttpRequestException)ExceptionDispatchInfo.
SetCurrentStackTrace
(new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(CultureInfo.InvariantCulture, SR.net_http_content_buffersize_exceeded, maxBufferSize)));
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)
842
ExceptionDispatchInfo.
SetCurrentStackTrace
(newException);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (1)
477
ExceptionDispatchInfo.
SetCurrentStackTrace
(hre);
System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs (2)
43
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new HttpRequestException(SR.net_http_content_write_larger_than_content_length)));
55
return Task.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, BytesWritten, _contentLength))));
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\Http2Connection.cs (2)
1203
return Task.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http2Connection))));
2179
innerException as HttpIOException ?? ExceptionDispatchInfo.
SetCurrentStackTrace
(new IOException(SR.net_http_request_aborted, innerException));
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (9)
1469
thisRef._waitSource.SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(
1506
public override ValueTask WriteAsync(ReadOnlyMemory<byte> destination, CancellationToken cancellationToken) => ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.net_http_content_readonly_stream)));
1525
public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken) => ValueTask.FromException<int>(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.net_http_content_writeonly_stream)));
1529
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) => Task.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.net_http_content_writeonly_stream)));
1537
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new HttpRequestException(SR.net_http_content_write_larger_than_content_length)));
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)))) :
1646
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http2WriteStream))));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (3)
1523
return ValueTask.FromException<int>(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http3RequestStream))));
1576
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http3WriteStream))));
1588
return Task.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(nameof(Http3WriteStream))));
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (1)
174
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new IOException(SR.ObjectDisposed_StreamClosed)));
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (6)
641
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.net_http_unsupported_version));
649
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new HttpRequestException(SR.net_http_client_execution_error,
650
ExceptionDispatchInfo.
SetCurrentStackTrace
(new InvalidOperationException(SR.net_http_chunked_not_allowed_with_empty_content))));
668
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.net_http_unsupported_chunking));
681
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new InvalidOperationException(SR.net_http_client_invalid_requesturi));
686
return ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.Format(SR.net_http_unsupported_requesturi_scheme, requestUri.Scheme)));
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)
654
Exception exception = ExceptionDispatchInfo.
SetCurrentStackTrace
(ThrowHelper.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode));
666
Exception exception = ExceptionDispatchInfo.
SetCurrentStackTrace
(ThrowHelper.GetConnectionAbortedException((long)data.ErrorCode));
680
Exception exception = ExceptionDispatchInfo.
SetCurrentStackTrace
(_disposed ? new ObjectDisposedException(GetType().FullName) : ThrowHelper.GetOperationAbortedException());
863
_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(GetType().FullName)));
System\Net\Quic\QuicListener.cs (3)
278
Exception ex = ExceptionDispatchInfo.
SetCurrentStackTrace
(new QuicException(QuicError.ConnectionTimeout, null, SR.Format(SR.net_quic_handshake_timeout, handshakeTimeout), oce));
317
ExceptionDispatchInfo.
SetCurrentStackTrace
(new QuicException(QuicError.CallbackError, null, SR.net_quic_callback_error, ex)) :
432
_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)
920
SetException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new WebException(SR.net_timeout, WebExceptionStatus.Timeout)));
System.Net.Security (1)
System\Net\Security\SslStream.IO.cs (1)
680
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status))));
System.Net.Sockets (3)
System\Net\Sockets\Socket.Tasks.cs (3)
738
var ex = ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.net_notconnected));
903
Exception e = ExceptionDispatchInfo.
SetCurrentStackTrace
(new SocketException((int)error));
1374
e = ExceptionDispatchInfo.
SetCurrentStackTrace
(e);
System.Net.WebSockets (10)
System\Net\WebSockets\ManagedWebSocket.cs (3)
537
ExceptionDispatchInfo.
SetCurrentStackTrace
(new WebSocketException(WebSocketError.ConnectionClosedPrematurely, exc)));
1013
inner = ExceptionDispatchInfo.
SetCurrentStackTrace
(
1722
return (OperationCanceledException)ExceptionDispatchInfo.
SetCurrentStackTrace
(new OperationCanceledException(
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
81
Exception exc = ExceptionDispatchInfo.
SetCurrentStackTrace
(
System\Net\WebSockets\WebSocketStream.cs (6)
134
ValueTask.FromException<int>(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException()));
154
ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException()));
199
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(GetType().FullName)));
204
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.NotWriteableStream)));
301
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new ObjectDisposedException(GetType().FullName)));
306
return ValueTask.FromException(ExceptionDispatchInfo.
SetCurrentStackTrace
(new NotSupportedException(SR.NotWriteableStream)));
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
1209
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)));