38 references to ThrowHelper
System.Net.Quic (38)
System\Net\Quic\Internal\MsQuicApi.cs (2)
48
ThrowHelper
.ThrowIfMsQuicError(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed");
230
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 (7)
322
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionOpen(
433
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionStart(
478
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionSetConfiguration(
607
ThrowHelper
.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(CloseAsync)}.{nameof(errorCode)}");
659
Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(
ThrowHelper
.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode));
667
Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(
ThrowHelper
.GetConnectionAbortedException((long)data.ErrorCode));
677
Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed ? 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)
125
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ListenerOpen(
155
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.ListenerStart(
System\Net\Quic\QuicListenerOptions.cs (1)
8
using static System.Net.Quic.
ThrowHelper
;
System\Net\Quic\QuicStream.cs (20)
172
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamOpen(
266
_startedTcs.TrySetException(
ThrowHelper
.GetExceptionForMsQuicStatus(status));
336
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamReceiveSetEnabled(
426
if (
ThrowHelper
.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception))
458
ThrowHelper
.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(Abort)}.{nameof(errorCode)}");
481
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown(
490
_receiveTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true);
494
var exception =
ThrowHelper
.GetOperationAbortedException(SR.net_quic_writing_aborted);
527
ThrowHelper
.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown(
552
if (
ThrowHelper
.TryGetStreamExceptionForMsQuicStatus(data.Status, out Exception? exception))
607
_receiveTcs.TrySetException(
ThrowHelper
.GetStreamAbortedException((long)data.ErrorCode), final: true);
612
_sendTcs.TrySetException(
ThrowHelper
.GetStreamAbortedException((long)data.ErrorCode), final: true);
633
(shutdownByApp: true, closedRemotely: true) =>
ThrowHelper
.GetConnectionAbortedException((long)data.ConnectionErrorCode),
635
(shutdownByApp: true, closedRemotely: false) =>
ThrowHelper
.GetOperationAbortedException(),
637
(shutdownByApp: false, closedRemotely: true) =>
ThrowHelper
.GetExceptionForMsQuicStatus(data.ConnectionCloseStatus, (long)data.ConnectionErrorCode),
639
(shutdownByApp: false, closedRemotely: false) =>
ThrowHelper
.GetExceptionForMsQuicStatus(data.ConnectionCloseStatus, (long)data.ConnectionErrorCode),
645
_startedTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException());
762
NetEventSource.Error(this, $"{this} StreamShutdown({flags}) failed: {
ThrowHelper
.GetErrorMessageForStatus(status)}.");
769
_receiveTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true);
773
_sendTcs.TrySetException(
ThrowHelper
.GetOperationAbortedException(SR.net_quic_writing_aborted), final: true);