Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeOk = 0 CodeUnknown = 1 CodeNullPointer = 2 CodeNullObject = 3 CodeInvalidSdkToken = 4 CodeInvalidArgs = 5 CodeInvalidJwt = -20 CodeJwtExpire = 7 CodeTODO = 8 CodeInvalidPassword = 9 CodePayOrderStatusInvalid = 10 CodeAccountPlatformNotSupport = 11 CodePayOrderAccountPlatformInvalid = 12 CodePayOrderAmountInvalid = 13 CodeMax = 255 )
错误码常量 1-255 系统预留
Variables ¶
View Source
var ( ErrOk = New(CodeOk, msg_Ok) ErrUnknown = New(CodeUnknown, msg_Unknown) ErrNullObject = New(CodeNullObject, msg_NullObject) ErrInvalidSdkToken = New(CodeInvalidSdkToken, msg_InvalidSdkToken) ErrInvalidArgs = New(CodeInvalidArgs, msg_InvalidArgs) ErrInvalidJwt = New(CodeInvalidJwt, msg_InvalidJwt) ErrJwtExpire = New(CodeJwtExpire, msg_JwtExpire) ErrTODO = New(CodeTODO, msg_TODO) ErrInvalidPassword = New(CodeInvalidPassword, msg_InvalidPassword) ErrPayOrderStatusInvalid = New(CodePayOrderStatusInvalid, msg_PayOrderStatusInvalid) ErrAccountPlatformNotSupport = New(CodeAccountPlatformNotSupport, msg_AccountPlatformNotSupport) ErrPayOrderAccountPlatformInvalid = New(CodePayOrderAccountPlatformInvalid, msg_PayOrderAccountPlatformInvalid) ErrPayOrderAmountInvalid = New(CodePayOrderAmountInvalid, msg_PayOrderAmountInvalid) )
Functions ¶
Types ¶
type CodeError ¶
func (*CodeError) Trace ¶
func (e *CodeError) Trace(values ...interface{}) *TraceError
拷贝error并且附加stack
func (*CodeError) TraceWithSkip ¶
func (e *CodeError) TraceWithSkip(skip int, values ...interface{}) *TraceError
type TraceError ¶
type TraceError struct {
// contains filtered or unexported fields
}
跟踪错误信息
func (*TraceError) Error ¶
func (e *TraceError) Error() string
func (*TraceError) Is ¶
func (e *TraceError) Is(err error) bool
func (*TraceError) Print ¶
func (e *TraceError) Print()
func (*TraceError) Unwrap ¶
func (e *TraceError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.