38 references to ThrowHelper
System.Net.Quic (38)
System\Net\Quic\Internal\MsQuicApi.cs (2)
48ThrowHelper.ThrowIfMsQuicError(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed"); 215throw 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 (8)
246ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionOpen( 354ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionStart( 398ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionSetConfiguration( 445bool connectionAbortedByPeer = ThrowHelper.IsConnectionAbortedWhenStartingStreamException(ex); 504ThrowHelper.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(CloseAsync)}.{nameof(errorCode)}"); 547Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode)); 555Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetConnectionAbortedException((long)data.ErrorCode)); 565Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed == 1 ? 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)
121ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ListenerOpen( 151ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ListenerStart(
System\Net\Quic\QuicListenerOptions.cs (1)
8using static System.Net.Quic.ThrowHelper;
System\Net\Quic\QuicStream.cs (19)
172if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? ex, streamWasSuccessfullyStarted: false, message: "StreamOpen failed")) 254if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception, streamWasSuccessfullyStarted: false)) 328ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamReceiveSetEnabled( 417if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception)) 449ThrowHelper.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(Abort)}.{nameof(errorCode)}"); 472ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( 481_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true); 485var exception = ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted); 518ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( 539if (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), 748NetEventSource.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);