errorhandler

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success                = DefaultErrHandler.LNewErrorDesc(error2.Success, "OK")
	ServiceNotfound        = DefaultErrHandler.LNewErrorDesc(error2.ServiceNotFound, "service no register")
	ErrMessageDecoding     = DefaultErrHandler.LNewErrorDesc(error2.MessageDecodingFailed, "RpcMessage decoding invalid")
	ErrMessageEncoding     = DefaultErrHandler.LNewErrorDesc(error2.MessageEncodingFailed, "RpcMessage encoding invalid")
	ErrServer              = DefaultErrHandler.LNewErrorDesc(error2.ServerError, "server error")
	ErrCallArgsType        = DefaultErrHandler.LNewErrorDesc(error2.CallArgsTypeErr, "call arguments type error")
	ErrCodecMarshalError   = DefaultErrHandler.LNewErrorDesc(error2.CodecMarshalErr, "codec.Marshal return one error")
	ErrCodecUnMarshalError = DefaultErrHandler.LNewErrorDesc(error2.CodecMarshalErr, "codec.UnMarshal return one error")
	ErrClient              = DefaultErrHandler.LNewErrorDesc(error2.ClientError, "client error")
	ErrConnection          = DefaultErrHandler.LNewErrorDesc(error2.ConnectionErr, "connection error")
	ContextNotFound        = DefaultErrHandler.LNewErrorDesc(error2.ContextNotFound, "context not found")
	ErrPlugin              = DefaultErrHandler.LNewErrorDesc(10275, "plugin error")
)
View Source
var DefaultErrHandler = New()

DefaultErrHandler 不带栈追踪的默认错误处理器

Functions

func New

func New() error2.LErrors

func NewStackTrace

func NewStackTrace() error2.LErrors

Types

type JsonErrorHandler

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

func (JsonErrorHandler) LNewErrorDesc

func (j JsonErrorHandler) LNewErrorDesc(code int, message string, mores ...interface{}) error2.LErrorDesc

func (JsonErrorHandler) LWarpErrorDesc

func (j JsonErrorHandler) LWarpErrorDesc(desc error2.LErrorDesc, mores ...interface{}) error2.LErrorDesc

Jump to

Keyboard shortcuts

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