Documentation
¶
Index ¶
- func GetCode(err error) int
- func GetErr(err error) error
- func GetMsg(err error) string
- func SetDebug(debug bool)
- type Error
- func GetErrors(err error) *Error
- func New(msg string, rawErr ...error) *Error
- func NewErrorf(rawErr error, msgFormat string, args ...interface{}) *Error
- func NewErrorfWithCode(code int, rawErr error, msgFormat string, args ...interface{}) *Error
- func NewWithCode(code int, msg string, rawErr error) *Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func NewErrorfWithCode ¶
创建错误 code 为错误码 rawErr 为原始错误信息 msgFormat 为格式化错误信息 args 为格式化参数
func NewWithCode ¶
创建错误 code 为错误码 msg 为错误信息 rawErr 为原始错误信息
Click to show internal directories.
Click to hide internal directories.