erro

package
v0.0.0-...-d853fe5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Succ                    = NewError(0, "succ")
	ErrInvalid              = NewError(-1, "Invalid")
	ErrServerStopped        = NewError(-2, "gobbq: the server has been stopped")
	ErrNoServive            = NewError(-3, "gobbq: no register service")
	ErrServerUnknown        = NewError(-4, "gobbq: the network is unknown")
	ErrUnknownClient        = NewError(-5, "unknown client")
	ErrBadContext           = NewError(-6, "bad context")
	ErrContextDone          = NewError(-7, "context done")
	ErrTimeOut              = NewError(-8, "time out")
	ErrBadCall              = NewError(-9, "bad call, no dst entity")
	ErrBadResponse          = NewError(-10, "unknown response")
	ErrMethodNameError      = NewError(-11, "mothod name error")
	ErrMethodNotFound       = NewError(-12, "mothod not found")
	ErrServiceNotFound      = NewError(-13, "service not found")
	ErrEntityNotFound       = NewError(-14, "entity not found")
	ErrUnknownCallType      = NewError(-15, "unknown call type")
	ErrEmptyEntityID        = NewError(-16, "bad call, empty dst entity")
	ErrBadRequest           = NewError(-17, "bad call, nil parameters")
	ErrConClosed            = NewError(-18, "conn closed")
	ErrConBlocking          = NewError(-18, "conn blocking")
	ErrNoServiveType        = NewError(-19, "unknown service type")
	ErrProxyServiceNotFound = NewError(-20, "service not found")
	ErrProxyNotFound        = NewError(-21, "proxy not found")
	ErrProxyInstNotFound    = NewError(-21, "inst not found in proxy")
)

Functions

func IsTemporary

func IsTemporary(err error) bool

IsTimeout checks if the error is a timeout error

func IsTimeout

func IsTimeout(err error) bool

IsTimeout checks if the error is a timeout error

Types

type CodeError

type CodeError interface {
	error
	Code() int32
	Message() string
}

type Error

type Error struct {
	ErrCode    int32
	ErrMessage string
}

func NewError

func NewError(code int32, msg string) *Error

func (*Error) Code

func (e *Error) Code() int32

func (*Error) Error

func (e *Error) Error() string

func (*Error) Is

func (e *Error) Is(err error) bool

func (*Error) Message

func (e *Error) Message() string

func (*Error) WithMessage

func (e *Error) WithMessage(msg string) IError

type IError

type IError interface {
	CodeError
	Is(error) bool
}

Jump to

Keyboard shortcuts

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