errors

package
v1.0.5-0...-20c45f9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrCode

type ErrCode int

func (ErrCode) Error

func (i ErrCode) Error() string

func (ErrCode) ToString

func (i ErrCode) ToString() string

type Error

type Error struct {
	Code     ErrCode
	CusError error
	Detail   error
}

func NewCustomError

func NewCustomError(code ErrCode, msg string) *Error

func NewDetailError

func NewDetailError(code ErrCode, err error) *Error

func NewError

func NewError(code ErrCode) *Error

func (Error) Error

func (i Error) Error() string

获取详情

func (Error) GetCode

func (i Error) GetCode() int

获取错误码

func (Error) GetMsg

func (i Error) GetMsg() string

获取错误码对应概况信息

type WxError

type WxError struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
}

func (WxError) Error

func (err WxError) Error() string

Jump to

Keyboard shortcuts

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