forked from quic-go/quic-go
improve documentation for the various error types (#5233)
This commit is contained in:
30
errors.go
30
errors.go
@@ -7,37 +7,67 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
// TransportError indicates an error that occurred on the QUIC transport layer.
|
||||||
|
// Every transport error other than CONNECTION_REFUSED and APPLICATION_ERROR is
|
||||||
|
// likely a bug in the implementation.
|
||||||
TransportError = qerr.TransportError
|
TransportError = qerr.TransportError
|
||||||
|
// ApplicationError is an application-defined error.
|
||||||
ApplicationError = qerr.ApplicationError
|
ApplicationError = qerr.ApplicationError
|
||||||
|
// VersionNegotiationError indicates a failure to negotiate a QUIC version.
|
||||||
VersionNegotiationError = qerr.VersionNegotiationError
|
VersionNegotiationError = qerr.VersionNegotiationError
|
||||||
|
// StatelessResetError indicates a stateless reset was received.
|
||||||
|
// This can happen when the peer reboots, or when packets are misrouted.
|
||||||
|
// See section 10.3 of RFC 9000 for details.
|
||||||
StatelessResetError = qerr.StatelessResetError
|
StatelessResetError = qerr.StatelessResetError
|
||||||
|
// IdleTimeoutError indicates that the connection timed out because it was inactive for too long.
|
||||||
IdleTimeoutError = qerr.IdleTimeoutError
|
IdleTimeoutError = qerr.IdleTimeoutError
|
||||||
|
// HandshakeTimeoutError indicates that the connection timed out before completing the handshake.
|
||||||
HandshakeTimeoutError = qerr.HandshakeTimeoutError
|
HandshakeTimeoutError = qerr.HandshakeTimeoutError
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
// TransportErrorCode is a QUIC transport error code, see section 20 of RFC 9000.
|
||||||
TransportErrorCode = qerr.TransportErrorCode
|
TransportErrorCode = qerr.TransportErrorCode
|
||||||
|
// ApplicationErrorCode is an QUIC application error code.
|
||||||
ApplicationErrorCode = qerr.ApplicationErrorCode
|
ApplicationErrorCode = qerr.ApplicationErrorCode
|
||||||
|
// StreamErrorCode is a QUIC stream error code. The meaning of the value is defined by the application.
|
||||||
StreamErrorCode = qerr.StreamErrorCode
|
StreamErrorCode = qerr.StreamErrorCode
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// NoError is the NO_ERROR transport error code.
|
||||||
NoError = qerr.NoError
|
NoError = qerr.NoError
|
||||||
|
// InternalError is the INTERNAL_ERROR transport error code.
|
||||||
InternalError = qerr.InternalError
|
InternalError = qerr.InternalError
|
||||||
|
// ConnectionRefused is the CONNECTION_REFUSED transport error code.
|
||||||
ConnectionRefused = qerr.ConnectionRefused
|
ConnectionRefused = qerr.ConnectionRefused
|
||||||
|
// FlowControlError is the FLOW_CONTROL_ERROR transport error code.
|
||||||
FlowControlError = qerr.FlowControlError
|
FlowControlError = qerr.FlowControlError
|
||||||
|
// StreamLimitError is the STREAM_LIMIT_ERROR transport error code.
|
||||||
StreamLimitError = qerr.StreamLimitError
|
StreamLimitError = qerr.StreamLimitError
|
||||||
|
// StreamStateError is the STREAM_STATE_ERROR transport error code.
|
||||||
StreamStateError = qerr.StreamStateError
|
StreamStateError = qerr.StreamStateError
|
||||||
|
// FinalSizeError is the FINAL_SIZE_ERROR transport error code.
|
||||||
FinalSizeError = qerr.FinalSizeError
|
FinalSizeError = qerr.FinalSizeError
|
||||||
|
// FrameEncodingError is the FRAME_ENCODING_ERROR transport error code.
|
||||||
FrameEncodingError = qerr.FrameEncodingError
|
FrameEncodingError = qerr.FrameEncodingError
|
||||||
|
// TransportParameterError is the TRANSPORT_PARAMETER_ERROR transport error code.
|
||||||
TransportParameterError = qerr.TransportParameterError
|
TransportParameterError = qerr.TransportParameterError
|
||||||
|
// ConnectionIDLimitError is the CONNECTION_ID_LIMIT_ERROR transport error code.
|
||||||
ConnectionIDLimitError = qerr.ConnectionIDLimitError
|
ConnectionIDLimitError = qerr.ConnectionIDLimitError
|
||||||
|
// ProtocolViolation is the PROTOCOL_VIOLATION transport error code.
|
||||||
ProtocolViolation = qerr.ProtocolViolation
|
ProtocolViolation = qerr.ProtocolViolation
|
||||||
|
// InvalidToken is the INVALID_TOKEN transport error code.
|
||||||
InvalidToken = qerr.InvalidToken
|
InvalidToken = qerr.InvalidToken
|
||||||
|
// ApplicationErrorErrorCode is the APPLICATION_ERROR transport error code.
|
||||||
ApplicationErrorErrorCode = qerr.ApplicationErrorErrorCode
|
ApplicationErrorErrorCode = qerr.ApplicationErrorErrorCode
|
||||||
|
// CryptoBufferExceeded is the CRYPTO_BUFFER_EXCEEDED transport error code.
|
||||||
CryptoBufferExceeded = qerr.CryptoBufferExceeded
|
CryptoBufferExceeded = qerr.CryptoBufferExceeded
|
||||||
|
// KeyUpdateError is the KEY_UPDATE_ERROR transport error code.
|
||||||
KeyUpdateError = qerr.KeyUpdateError
|
KeyUpdateError = qerr.KeyUpdateError
|
||||||
|
// AEADLimitReached is the AEAD_LIMIT_REACHED transport error code.
|
||||||
AEADLimitReached = qerr.AEADLimitReached
|
AEADLimitReached = qerr.AEADLimitReached
|
||||||
|
// NoViablePathError is the NO_VIABLE_PATH_ERROR transport error code.
|
||||||
NoViablePathError = qerr.NoViablePathError
|
NoViablePathError = qerr.NoViablePathError
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user