errors

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRpcNotFound  = gerror.New("rpc service or method not found")
	ErrRpcTimeOut   = gerror.New("rpc proxy call time out")
	ErrRpcException = gerror.New("rpc method execute throw exception")
	ErrRpcNotInit   = gerror.New("rpc framework not init")
	ErrRpcClosed    = gerror.New("rpc has been closed")
	ErrInvalidProto = gerror.New("invalid rpc protocol")
)
View Source
var (
	ErrTransClose      = &RpcError{TransportClosed, "Transport has been closed"}
	ErrProxyInvalid    = &RpcError{ProxyNotExist, "Proxy Is Invalid"}
	ErrStubCallInvalid = &RpcError{StubcallInvalid, "stubcall invalid"}
	ErrServicePanic    = &RpcError{ServicePanic, "service exec panic"}
	ErrIllegalReq      = &RpcError{errCode: CommErr, errStr: "invalid request messsage!"}
	ErrIllegalProto    = &RpcError{errCode: CommErr, errStr: "rpc protocol message buffer error !"}
)

Functions

This section is empty.

Types

type RpcError

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

func NewMethodExecError

func NewMethodExecError(service, method string) *RpcError

func NewProxyDisconnected

func NewProxyDisconnected(uuid uint64, id uint32, name string) *RpcError

func NewProxyNotExit

func NewProxyNotExit(proxyid uint32) *RpcError

func NewProxyNotFound

func NewProxyNotFound(callid uint32) *RpcError

func NewRpcError

func NewRpcError(code RpcErrorCode, format string, args ...interface{}) *RpcError

func NewServiceNotExist

func NewServiceNotExist(uuid uint64) *RpcError

func (*RpcError) Code

func (re *RpcError) Code() RpcErrorCode

func (*RpcError) Error

func (re *RpcError) Error() string

type RpcErrorCode

type RpcErrorCode uint32
const (
	RpcNoErr RpcErrorCode = iota
	CommErr
	TransportClosed
	ProxyNotExist
	ProxyDisconnected
	ProxyTimeout
	ProxyCallNoFound
	StubcallInvalid
	ServiceShutdown
	ServiceNotExist
	ServiceHasExist
	MethodException
	ServicePanic
	SERVICE_NOT_FOUND
	FUNCTION_NOT_FOUND
)

Jump to

Keyboard shortcuts

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