15 instantiations of QuicException
System.Net.Quic (15)
System\Net\Quic\Internal\ThrowHelper.cs (11)
18return new QuicException(QuicError.ConnectionAborted, errorCode, SR.Format(SR.net_quic_connectionaborted, errorCode)); 23return new QuicException(QuicError.StreamAborted, errorCode, SR.Format(SR.net_quic_streamaborted, errorCode)); 28return new QuicException(QuicError.OperationAborted, null, message ?? SR.net_quic_operationaborted); 49exception = new QuicException(QuicError.ConnectionAborted, null, ""); 87if (status == QUIC_STATUS_CONNECTION_REFUSED) return new QuicException(QuicError.ConnectionRefused, null, errorCode, SR.net_quic_connection_refused); 88if (status == QUIC_STATUS_CONNECTION_TIMEOUT) return new QuicException(QuicError.ConnectionTimeout, null, errorCode, SR.net_quic_timeout); 89if (status == QUIC_STATUS_VER_NEG_ERROR) return new QuicException(QuicError.VersionNegotiationError, null, errorCode, SR.net_quic_ver_neg_error); 90if (status == QUIC_STATUS_CONNECTION_IDLE) return new QuicException(QuicError.ConnectionIdle, null, errorCode, SR.net_quic_connection_idle); 91if (status == QUIC_STATUS_PROTOCOL_ERROR) return new QuicException(QuicError.TransportError, null, errorCode, SR.net_quic_protocol_error); 92if (status == QUIC_STATUS_ALPN_IN_USE) return new QuicException(QuicError.AlpnInUse, null, errorCode, SR.net_quic_protocol_error); 143return new QuicException(QuicError.InternalError, null, SR.Format(SR.net_quic_internal_error, GetErrorMessageForStatus(status, message)));
System\Net\Quic\QuicConnection.cs (1)
89throw new QuicException(QuicError.ConnectionTimeout, null, SR.Format(SR.net_quic_handshake_timeout, options.HandshakeTimeout));
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
252throw new QuicException(QuicError.CallbackError, null, SR.net_quic_callback_error, ex);
System\Net\Quic\QuicListener.cs (2)
294Exception ex = ExceptionDispatchInfo.SetCurrentStackTrace(new QuicException(QuicError.ConnectionTimeout, null, SR.Format(SR.net_quic_handshake_timeout, handshakeTimeout), oce)); 315ExceptionDispatchInfo.SetCurrentStackTrace(new QuicException(QuicError.CallbackError, null, SR.net_quic_callback_error, ex)) :
69 references to QuicException
IIS.FunctionalTests (8)
Http3Tests.cs (8)
124var qex = Assert.IsType<QuicException>(ex.InnerException); 140var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 157var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 171var qex = Assert.IsType<QuicException>(ex.InnerException);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
Http3Tests.cs (8)
177var qex = Assert.IsType<QuicException>(ex.InnerException); 210var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 236var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 257var qex = Assert.IsType<QuicException>(ex.InnerException);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (11)
Internal\QuicConnectionContext.cs (3)
131catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionAborted) 147catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted) 162catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionTimeout)
Internal\QuicConnectionListener.cs (2)
128catch (QuicException e) when (e.QuicError == QuicError.AlpnInUse) 176catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted)
Internal\QuicStreamContext.cs (6)
273catch (QuicException ex) when (ex.QuicError is QuicError.StreamAborted or QuicError.ConnectionAborted) 284catch (QuicException ex) when (ex.QuicError is QuicError.ConnectionIdle) 292catch (QuicException ex) when (ex.QuicError is QuicError.OperationAborted) 434catch (QuicException ex) when (ex.QuicError is QuicError.StreamAborted or QuicError.ConnectionAborted) 445catch (QuicException ex) when (ex.QuicError is QuicError.ConnectionIdle) 453catch (QuicException ex) when (ex.QuicError is QuicError.OperationAborted)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (15)
QuicConnectionContextTests.cs (9)
68var ex = await ExceptionAssert.ThrowsAsync<QuicException>( 139var innerEx = Assert.IsType<QuicException>(ex.InnerException); 302var innerEx = Assert.IsType<QuicException>(ex.InnerException); 428Assert.Equal((long)Http3ErrorCode.InternalError, ((QuicException)ex.InnerException).ApplicationErrorCode.Value); 477Assert.Equal((long)Http3ErrorCode.InternalError, ((QuicException)serverEx.InnerException).ApplicationErrorCode.Value); 487var clientEx = await Assert.ThrowsAsync<QuicException>(() => clientStream.ReadAsync(buffer).AsTask()).DefaultTimeout();
QuicStreamContextTests.cs (6)
281Assert.Equal((long)Http3ErrorCode.InternalError, ((QuicException)ex.InnerException).ApplicationErrorCode.Value); 356Assert.Equal((long)Http3ErrorCode.InternalError, ((QuicException)ex.InnerException).ApplicationErrorCode.Value); 466var ex = await Assert.ThrowsAsync<QuicException>(() => clientStream.ReadAsync(new byte[1024]).AsTask()).DefaultTimeout(); 521var clientEx = await Assert.ThrowsAsync<QuicException>(() => clientStream.WriteAsync(data).AsTask()).DefaultTimeout();
System.Net.Http (17)
System\Net\Http\HttpProtocolException.cs (1)
51internal static HttpProtocolException CreateHttp3StreamException(Http3ErrorCode protocolError, QuicException innerException)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (10)
195catch (QuicException e) when (e.QuicError != QuicError.OperationAborted) { } 238catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted) 388if (t.Exception?.InnerException is QuicException ex && ex.QuicError == QuicError.StreamAborted) 396catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionAborted) 453catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted) 457catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionAborted) 495catch (QuicException ex) when (ex.QuicError == QuicError.StreamAborted) 588catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted) 592catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionAborted) 689catch (QuicException ex) when (ex.QuicError == QuicError.StreamAborted)
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (6)
246catch (QuicException ex) when (ex.QuicError == QuicError.StreamAborted) 269catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionAborted) 278catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted && _connection.AbortException != null) 1261case QuicException e when (e.QuicError == QuicError.StreamAborted): 1266case QuicException e when (e.QuicError == QuicError.ConnectionAborted): 1273case QuicException e when (e.QuicError == QuicError.OperationAborted && _connection.AbortException != null):
System.Net.Quic (10)
System\Net\Quic\Internal\ThrowHelper.cs (4)
16internal static QuicException GetConnectionAbortedException(long errorCode) 21internal static QuicException GetStreamAbortedException(long errorCode) 26internal static QuicException GetOperationAbortedException(string? message = null) 69internal static bool IsConnectionAbortedWhenStartingStreamException(Exception ex) => ex is QuicException qe && qe.QuicError == QuicError.ConnectionAborted && qe.ApplicationErrorCode is null;
System\Net\Quic\QuicException.cs (4)
14/// Initializes a new instance of the <see cref='QuicException'/> class. 24/// Initializes a new instance of the <see cref='QuicException'/> class. 35/// Initializes a new instance of the <see cref='QuicException'/> class. 46/// Initializes a new instance of the <see cref='QuicException'/> class.
System\Net\Quic\QuicListener.cs (1)
168/// Also propagates exceptions from failed connection handshake, e.g. <see cref="AuthenticationException"/>, <see cref="QuicException"/>.
System\Net\Quic\QuicStream.cs (1)
485var exception = ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted);