Documentation
¶
Index ¶
- Variables
- func Cause(err error) error
- func JsonStr(err error) string
- func Message(err error) string
- func NewRetCodeMsg(retcode int, msg string) *withRetCodeMessage
- func NewStack() *internal.MyStack
- func RetCode(err error) int
- func RetCodeMsg(err error) *withRetCodeMessage
- func Stack(err error) *internal.MyStack
- func UnSafeInitCodeSet()
- func WithMessage(err error, msg string) error
- func WithRetCode(err error, retCode int) error
- func WithRetCodeMessage(err error, rm *withRetCodeMessage) error
- func WithRetCodeMessagef(err error, retCode int, format string, args ...interface{}) error
- func WithStack(err error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RetCodeSuccess int = 0 MsgSuccess = "success" CodeMsgSuccess = NewRetCodeMsg(RetCodeSuccess, MsgSuccess) RetCodeFailure int = 1 MsgFailure = "failure" CodeMsgFailure = NewRetCodeMsg(RetCodeFailure, MsgFailure) RetCodeUnknown int = 2 MsgUnknown = "unknown" CodeMsgUnknown = NewRetCodeMsg(RetCodeUnknown, MsgUnknown) )
Functions ¶
func NewRetCodeMsg ¶
func RetCodeMsg ¶
func RetCodeMsg(err error) *withRetCodeMessage
func UnSafeInitCodeSet ¶
func UnSafeInitCodeSet()
func WithMessage ¶
func WithRetCode ¶
func WithRetCodeMessage ¶
func WithRetCodeMessagef ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.