Documentation ¶
Overview ¶
Package simplerr implement error with code
Index ¶
- func GetText(err error) string
- func GetWithCode(err error) error
- func HasCode(err error, code ErrCode) bool
- func Is(err, target error) bool
- func New(msg string) error
- func NewWithCode(msg string, code ErrCode) error
- func WithCode(err error, code ErrCode) error
- func WithStack(err error) error
- func Wrap(err error, msg string) error
- func WrapWithCode(err error, code ErrCode, msg string) error
- func Wrapf(err error, tmpl string, args ...interface{}) error
- func WrapfWithCode(err error, code ErrCode, tmpl string, args ...interface{}) error
- type Call
- type ErrCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWithCode ¶ added in v0.6.0
func NewWithCode ¶ added in v0.9.0
Types ¶
type ErrCode ¶ added in v0.5.0
func AlreadyExistsCode ¶ added in v0.8.0
func ForbiddenCode ¶ added in v0.8.0
func InternalCode ¶ added in v0.8.0
func InvalidArgumentCode ¶ added in v0.8.1
func NotFoundCode ¶ added in v0.8.0
func UnauthorizedCode ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.