quic-go: github.com/lucas-clemente/quic-go/internal/qerr Index | Files

package qerr

import "github.com/lucas-clemente/quic-go/internal/qerr"

Index

Package Files

error_codes.go quic_error.go

type ErrorCode Uses

type ErrorCode uint64

ErrorCode can be used as a normal error without reason.

const (
    NoError                 ErrorCode = 0x0
    InternalError           ErrorCode = 0x1
    ServerBusy              ErrorCode = 0x2
    FlowControlError        ErrorCode = 0x3
    StreamLimitError        ErrorCode = 0x4
    StreamStateError        ErrorCode = 0x5
    FinalSizeError          ErrorCode = 0x6
    FrameEncodingError      ErrorCode = 0x7
    TransportParameterError ErrorCode = 0x8
    VersionNegotiationError ErrorCode = 0x9
    ProtocolViolation       ErrorCode = 0xa
    InvalidMigration        ErrorCode = 0xc
)

The error codes defined by QUIC

func (ErrorCode) Error Uses

func (e ErrorCode) Error() string

func (ErrorCode) String Uses

func (e ErrorCode) String() string

type QuicError Uses

type QuicError struct {
    ErrorCode    ErrorCode
    ErrorMessage string
    // contains filtered or unexported fields
}

A QuicError consists of an error code plus a error reason

func ApplicationError Uses

func ApplicationError(errorCode ErrorCode, errorMessage string) *QuicError

func CryptoError Uses

func CryptoError(tlsAlert uint8, errorMessage string) *QuicError

CryptoError create a new QuicError instance for a crypto error

func Error Uses

func Error(errorCode ErrorCode, errorMessage string) *QuicError

Error creates a new QuicError instance

func TimeoutError Uses

func TimeoutError(errorMessage string) *QuicError

TimeoutError creates a new QuicError instance for a timeout error

func ToQuicError Uses

func ToQuicError(err error) *QuicError

ToQuicError converts an arbitrary error to a QuicError. It leaves QuicErrors unchanged, and properly handles `ErrorCode`s.

func (*QuicError) Error Uses

func (e *QuicError) Error() string

func (*QuicError) IsCryptoError Uses

func (e *QuicError) IsCryptoError() bool

IsCryptoError says if this error is a crypto error

func (*QuicError) Temporary Uses

func (e *QuicError) Temporary() bool

Temporary says if the error is temporary.

func (*QuicError) Timeout Uses

func (e *QuicError) Timeout() bool

Timeout says if this error is a timeout.

Package qerr imports 3 packages (graph) and is imported by 14 packages. Updated 2019-07-03. Refresh now. Tools for package owners.