errors

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasCode

func HasCode(err error, code int) bool

Types

type AuthenticationError

type AuthenticationError struct {
	ErrorCode
	AuthDetail interface{}
}

func NewAuthenticationError

func NewAuthenticationError(detail interface{}) AuthenticationError

func (AuthenticationError) Error

func (err AuthenticationError) Error() string

type ConfigurationError

type ConfigurationError struct {
	ErrorCode
}

func NewConfigurationError

func NewConfigurationError() ConfigurationError

func (ConfigurationError) Error

func (r ConfigurationError) Error() string

type CorruptedPacketError

type CorruptedPacketError struct {
	ErrorCode
}

func NewCorruptedPacketError

func NewCorruptedPacketError() CorruptedPacketError

func (CorruptedPacketError) Error

func (err CorruptedPacketError) Error() string

type ErrorCode

type ErrorCode int

func (ErrorCode) Code

func (code ErrorCode) Code() int

func (ErrorCode) Prefix

func (code ErrorCode) Prefix() string

type ErrorWithCode

type ErrorWithCode interface {
	error
	Code() int
}

type IPFormatError

type IPFormatError struct {
	ErrorCode
	IP []byte
}

func NewIPFormatError

func NewIPFormatError(ip []byte) IPFormatError

func (IPFormatError) Error

func (err IPFormatError) Error() string

type InvalidOperationError

type InvalidOperationError struct {
	ErrorCode
	Operation string
}

func NewInvalidOperationError

func NewInvalidOperationError(operation string) InvalidOperationError

func (InvalidOperationError) Error

func (r InvalidOperationError) Error() string

type ProtocolVersionError

type ProtocolVersionError struct {
	ErrorCode
	Version int
}

func NewProtocolVersionError

func NewProtocolVersionError(version int) ProtocolVersionError

func (ProtocolVersionError) Error

func (err ProtocolVersionError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL