stderror

package
v3.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientConfigIsEmpty                     = "mieru client config is empty"
	ClientConfigNotExist                    = "mieru client config file doesn't exist"
	ClientGetActiveProfileFailedErr         = "mieru client get active profile failed: %w"
	ClientNotRunning                        = "mieru client is not running"
	ClientNotRunningErr                     = "mieru client is not running: %w"
	CreateClientLifecycleRPCClientFailedErr = "create mieru client lifecycle RPC client failed: %w"
	CreateEmptyServerConfigFailedErr        = "create empty mita server config file failed: %w"
	CreateServerConfigRPCClientFailedErr    = "create mita server config RPC client failed: %w"
	CreateServerLifecycleRPCClientFailedErr = "create mita server lifecycle RPC client failed: %w"
	CreateSocks5ServerFailedErr             = "create socks5 server failed: %w"
	DecodeHashedPasswordFailedErr           = "decode hashed password failed: %w"
	ExitFailedErr                           = "process exit failed: %w"
	GetClientConfigFailedErr                = "get mieru client config failed: %w"
	GetConnectionsFailedErr                 = "get connections failed: %w"
	GetHeapProfileFailedErr                 = "get heap profile failed: %w"
	GetMemoryStatisticsFailedErr            = "get memory statistics failed: %w"
	GetMetricsFailedErr                     = "get metrics failed: %w"
	GetServerConfigFailedErr                = "get mita server config failed: %w"
	GetServerStatusFailedErr                = "get mita server status failed: %w"
	GetThreadDumpFailedErr                  = "get thread dump failed: %w"
	InvalidPortBindingsErr                  = "invalid port bindings: %w"
	InvalidTransportProtocol                = "invalid transport protocol"
	IPAddressNotFound                       = "IP address not found from domain name %q"
	LookupIPFailedErr                       = "look up IP address failed: %w"
	ParseIPFailed                           = "parse IP address failed"
	ReloadServerFailedErr                   = "reload mita server failed: %w"
	SegmentSizeTooBig                       = "segment size too big"
	ServerNotRunningErr                     = "mita server daemon is not running: %w"
	ServerNotRunningWithCommand             = "" /* 195-byte string literal not displayed */
	ServerProxyNotRunningErr                = "mita server proxy is not running: %w"
	SetServerConfigFailedErr                = "set mita server config failed: %w"
	StartClientFailedErr                    = "start mieru client failed: %w"
	StartCPUProfileFailedErr                = "start CPU profile failed: %w"
	StartServerProxyFailedErr               = "start mita server proxy failed: %w"
	StopServerProxyFailedErr                = "stop mita server proxy failed: %w"
	StoreClientConfigFailedErr              = "store mieru client config failed: %w"
	ValidateFullClientConfigFailedErr       = "validate full client config failed: %w"
	ValidateServerConfigPatchFailedErr      = "validate server config patch failed: %w"
)

Variables

View Source
var (
	ErrAlreadyExist     = fmt.Errorf("ALREADY EXIST")
	ErrAlreadyStarted   = fmt.Errorf("ALREADY STARTED")
	ErrDisconnected     = fmt.Errorf("DISCONNECTED")
	ErrEmpty            = fmt.Errorf("EMPTY")
	ErrFileNotExist     = fmt.Errorf("FILE NOT EXIST")
	ErrFull             = fmt.Errorf("FULL")
	ErrIDNotMatch       = fmt.Errorf("ID NOT MATCH")
	ErrInternal         = fmt.Errorf("INTERNAL")
	ErrInvalidArgument  = fmt.Errorf("INVALID ARGUMENT")
	ErrInvalidOperation = fmt.Errorf("INVALID OPERATION")
	ErrNoEnoughData     = fmt.Errorf("NO ENOUGH DATA")
	ErrNotFound         = fmt.Errorf("NOT FOUND")
	ErrNotReady         = fmt.Errorf("NOT READY")
	ErrNotRunning       = fmt.Errorf("NOT RUNNING")
	ErrNullPointer      = fmt.Errorf("NULL POINTER")
	ErrOutOfRange       = fmt.Errorf("OUT OF RANGE")
	ErrTimeout          = fmt.Errorf("TIMEOUT")
	ErrUnknownCommand   = fmt.Errorf("UNKNOWN COMMAND")
	ErrUnsupported      = fmt.Errorf("UNSUPPORTED")
)

Functions

func IsClosed

func IsClosed(err error) bool

IsClosed returns true if the cause of error is connection close.

func IsConnRefused

func IsConnRefused(err error) bool

IsConnRefused returns true if the cause of error is connection refused.

func IsEOF

func IsEOF(err error) bool

IsEOF returns true if the cause of error is EOF.

func IsNotReady

func IsNotReady(err error) bool

IsNotReady returns true if the caller should retry the same operation again.

func IsPermissionDenied

func IsPermissionDenied(err error) bool

IsPermissionDenied returns true if the cause of error is permission denied.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout returns true if the cause of error is timeout.

Types

type ErrorType

type ErrorType uint8

ErrorType provides a marker of runtime error.

const (
	NO_ERROR ErrorType = iota
	UNKNOWN_ERROR
	PROTOCOL_ERROR
	NETWORK_ERROR
	CRYPTO_ERROR
	REPLAY_ERROR
)

func GetErrorType added in v3.8.0

func GetErrorType(err error) ErrorType

GetErrorType returns the type associated with an error.

type TypedError added in v3.8.0

type TypedError struct {
	// contains filtered or unexported fields
}

TypedError annotates an error with a type.

func WrapErrorWithType added in v3.8.0

func WrapErrorWithType(err error, t ErrorType) TypedError

WrapErrorWithType creates a new TypedError object from an error and annotate it with a type.

func (TypedError) Error added in v3.8.0

func (e TypedError) Error() string

func (TypedError) Unwrap added in v3.8.0

func (e TypedError) Unwrap() error

Jump to

Keyboard shortcuts

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