38 references to ThrowHelper
System.Net.Quic (38)
System\Net\Quic\Internal\MsQuicApi.cs (2)
48
ThrowHelper
.ThrowIfMsQuicError(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed");
215
throw
ThrowHelper
.GetExceptionForMsQuicStatus(openStatus);
System\Net\Quic\Internal\MsQuicConfiguration.cs (2)
215
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConfigurationOpen(
297
ThrowHelper
.ThrowIfMsQuicError(status, "ConfigurationLoadCredential failed");
System\Net\Quic\Internal\MsQuicHelpers.cs (2)
74
ThrowHelper
.ThrowMsQuicException(status, $"GetParam({handle}, {parameter}) failed");
93
ThrowHelper
.ThrowMsQuicException(status, $"SetParam({handle}, {parameter}) failed");
System\Net\Quic\QuicConnection.cs (8)
246
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionOpen(
354
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionStart(
398
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionSetConfiguration(
445
bool connectionAbortedByPeer =
ThrowHelper
.IsConnectionAbortedWhenStartingStreamException(ex);
504
ThrowHelper
.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(CloseAsync)}.{nameof(errorCode)}");
547
Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(
ThrowHelper
.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode));
555
Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(
ThrowHelper
.GetConnectionAbortedException((long)data.ErrorCode));
565
Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed == 1 ? new ObjectDisposedException(GetType().FullName) :
ThrowHelper
.GetOperationAbortedException());
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
168
NetEventSource.Error(_connection, $"{_connection} ConnectionCertificateValidationComplete failed with {
ThrowHelper
.GetErrorMessageForStatus(status)}");
System\Net\Quic\QuicConnectionOptions.cs (1)
7
using static System.Net.Quic.
ThrowHelper
;
System\Net\Quic\QuicListener.cs (2)
121
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ListenerOpen(
151
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ListenerStart(
System\Net\Quic\QuicListenerOptions.cs (1)
8
using static System.Net.Quic.
ThrowHelper
;
System\Net\Quic\QuicStream.cs (19)
172
if (
ThrowHelper
.TryGetStreamExceptionForMsQuicStatus(status, out Exception? ex, streamWasSuccessfullyStarted: false, message: "StreamOpen failed"))
254
if (
ThrowHelper
.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception, streamWasSuccessfullyStarted: false))
328
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamReceiveSetEnabled(
417
if (
ThrowHelper
.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception))
449
ThrowHelper
.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(Abort)}.{nameof(errorCode)}");
472
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown(
481
_receiveTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true);
485
var exception =
ThrowHelper
.GetOperationAbortedException(SR.net_quic_writing_aborted);
518
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown(
539
if (
ThrowHelper
.TryGetStreamExceptionForMsQuicStatus(data.Status, out Exception? exception))
593
_receiveTcs.TrySetException(
ThrowHelper
.GetStreamAbortedException((long)data.ErrorCode), final: true);
598
_sendTcs.TrySetException(
ThrowHelper
.GetStreamAbortedException((long)data.ErrorCode), final: true);
619
(shutdownByApp: true, closedRemotely: true) =>
ThrowHelper
.GetConnectionAbortedException((long)data.ConnectionErrorCode),
621
(shutdownByApp: true, closedRemotely: false) =>
ThrowHelper
.GetOperationAbortedException(),
623
(shutdownByApp: false, closedRemotely: true) =>
ThrowHelper
.GetExceptionForMsQuicStatus(data.ConnectionCloseStatus, (long)data.ConnectionErrorCode, $"Shutdown by transport {data.ConnectionErrorCode}"),
625
(shutdownByApp: false, closedRemotely: false) =>
ThrowHelper
.GetExceptionForMsQuicStatus(data.ConnectionCloseStatus, (long)data.ConnectionErrorCode),
748
NetEventSource.Error(this, $"{this} StreamShutdown({flags}) failed: {
ThrowHelper
.GetErrorMessageForStatus(status)}.");
755
_receiveTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true);
759
_sendTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException(SR.net_quic_writing_aborted), final: true);