Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = DefaultErrHandler.LNewErrorDesc(error.Success, "OK") ServiceNotfound = DefaultErrHandler.LNewErrorDesc(error.ServiceNotFound, "service no register") ErrMessageDecoding = DefaultErrHandler.LNewErrorDesc(error.MessageDecodingFailed, "RpcMessage decoding invalid") ErrMessageEncoding = DefaultErrHandler.LNewErrorDesc(error.MessageEncodingFailed, "RpcMessage encoding invalid") ErrServer = DefaultErrHandler.LNewErrorDesc(error.ServerError, "server error") ErrCallArgsType = DefaultErrHandler.LNewErrorDesc(error.CallArgsTypeErr, "call arguments type error") ErrCodecMarshalError = DefaultErrHandler.LNewErrorDesc(error.CodecMarshalErr, "codec.Marshal return one error") ErrCodecUnMarshalError = DefaultErrHandler.LNewErrorDesc(error.CodecMarshalErr, "codec.UnMarshal return one error") ErrClient = DefaultErrHandler.LNewErrorDesc(error.ClientError, "client error") ErrConnection = DefaultErrHandler.LNewErrorDesc(error.ConnectionErr, "connection error") ContextNotFound = DefaultErrHandler.LNewErrorDesc(error.ContextNotFound, "context not found") )
View Source
var DefaultErrHandler = New()
DefaultErrHandler 不带栈追踪的默认错误处理器
Functions ¶
func NewStackTrace ¶
Types ¶
type JsonErrorHandler ¶
type JsonErrorHandler struct {
// contains filtered or unexported fields
}
func (JsonErrorHandler) LNewErrorDesc ¶
func (j JsonErrorHandler) LNewErrorDesc(code int, message string, mores ...interface{}) perror.LErrorDesc
func (JsonErrorHandler) LWarpErrorDesc ¶
func (j JsonErrorHandler) LWarpErrorDesc(desc perror.LErrorDesc, mores ...interface{}) perror.LErrorDesc
Click to show internal directories.
Click to hide internal directories.