38 references to ThrowHelper
System.Net.Quic (38)
System\Net\Quic\Internal\MsQuicApi.cs (2)
48ThrowHelper.ThrowIfMsQuicError(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed"); 230throw ThrowHelper.GetExceptionForMsQuicStatus(openStatus);
System\Net\Quic\Internal\MsQuicConfiguration.cs (2)
215ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConfigurationOpen( 297ThrowHelper.ThrowIfMsQuicError(status, "ConfigurationLoadCredential failed");
System\Net\Quic\Internal\MsQuicHelpers.cs (2)
74ThrowHelper.ThrowMsQuicException(status, $"GetParam({handle}, {parameter}) failed"); 93ThrowHelper.ThrowMsQuicException(status, $"SetParam({handle}, {parameter}) failed");
System\Net\Quic\QuicConnection.cs (7)
322ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionOpen( 433ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionStart( 478ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionSetConfiguration( 607ThrowHelper.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(CloseAsync)}.{nameof(errorCode)}"); 659Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode)); 667Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetConnectionAbortedException((long)data.ErrorCode)); 677Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed ? new ObjectDisposedException(GetType().FullName) : ThrowHelper.GetOperationAbortedException());
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
168NetEventSource.Error(_connection, $"{_connection} ConnectionCertificateValidationComplete failed with {ThrowHelper.GetErrorMessageForStatus(status)}");
System\Net\Quic\QuicConnectionOptions.cs (1)
7using static System.Net.Quic.ThrowHelper;
System\Net\Quic\QuicListener.cs (2)
125ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ListenerOpen( 155ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ListenerStart(
System\Net\Quic\QuicListenerOptions.cs (1)
8using static System.Net.Quic.ThrowHelper;
System\Net\Quic\QuicStream.cs (20)
172ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamOpen( 266_startedTcs.TrySetException(ThrowHelper.GetExceptionForMsQuicStatus(status)); 336ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamReceiveSetEnabled( 426if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception)) 458ThrowHelper.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(Abort)}.{nameof(errorCode)}"); 481ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( 490_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true); 494var exception = ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted); 527ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( 552if (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()); 762NetEventSource.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);