38 references to ThrowHelper
System.Net.Quic (38)
System\Net\Quic\Internal\MsQuicApi.cs (2)
50ThrowHelper.ThrowIfMsQuicError(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed"); 232throw ThrowHelper.GetExceptionForMsQuicStatus(openStatus);
System\Net\Quic\Internal\MsQuicConfiguration.cs (2)
219ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConfigurationOpen( 301ThrowHelper.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)
323ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionOpen( 434ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionStart( 477ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ConnectionSetConfiguration( 605ThrowHelper.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(CloseAsync)}.{nameof(errorCode)}"); 654Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetExceptionForMsQuicStatus(data.Status, (long)data.ErrorCode)); 666Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetConnectionAbortedException((long)data.ErrorCode)); 680Exception 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)
127ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ListenerOpen( 157ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.ListenerStart(
System\Net\Quic\QuicListenerOptions.cs (1)
8using static System.Net.Quic.ThrowHelper;
System\Net\Quic\QuicStream.cs (20)
202ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamOpen( 296_startedTcs.TrySetException(ThrowHelper.GetExceptionForMsQuicStatus(status)); 366ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamReceiveSetEnabled( 456if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception)) 488ThrowHelper.ValidateErrorCode(nameof(errorCode), errorCode, $"{nameof(Abort)}.{nameof(errorCode)}"); 511ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( 520_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted)); 524var exception = ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted); 557ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( 582if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(data.Status, out Exception? exception)) 637_receiveTcs.TrySetException(ThrowHelper.GetStreamAbortedException((long)data.ErrorCode)); 642_sendTcs.TrySetException(ThrowHelper.GetStreamAbortedException((long)data.ErrorCode)); 663(shutdownByApp: true, closedRemotely: true) => ThrowHelper.GetConnectionAbortedException((long)data.ConnectionErrorCode), 665(shutdownByApp: true, closedRemotely: false) => ThrowHelper.GetOperationAbortedException(), 667(shutdownByApp: false, closedRemotely: true) => ThrowHelper.GetExceptionForMsQuicStatus(data.ConnectionCloseStatus, (long)data.ConnectionErrorCode), 669(shutdownByApp: false, closedRemotely: false) => ThrowHelper.GetExceptionForMsQuicStatus(data.ConnectionCloseStatus, (long)data.ConnectionErrorCode), 677_startedTcs.TrySetException(ThrowHelper.GetOperationAbortedException()); 795NetEventSource.Error(this, $"{this} StreamShutdown({flags}) failed: {ThrowHelper.GetErrorMessageForStatus(status)}."); 802_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted)); 806_sendTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted));