Documentation
¶
Overview ¶
Package simplerr implement error with code
Index ¶
- func GetText(err error) string
- func HasCode(err error, code ErrCodeInterface) bool
- func Is(err, target error) bool
- func WithCode(err error, code ErrCodeInterface) error
- func Wrap(err error, msg string) error
- func WrapWithCode(err error, code ErrCodeInterface, msg string) error
- func Wrapf(err error, tmpl string, args ...interface{}) error
- func WrapfWithCode(err error, code ErrCodeInterface, tmpl string, args ...interface{}) error
- type Call
- type ErrCode
- type ErrCodeInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasCode ¶
func HasCode(err error, code ErrCodeInterface) bool
func WithCode ¶ added in v0.4.0
func WithCode(err error, code ErrCodeInterface) error
func WrapWithCode ¶
func WrapWithCode(err error, code ErrCodeInterface, msg string) error
func WrapfWithCode ¶
func WrapfWithCode(err error, code ErrCodeInterface, tmpl string, args ...interface{}) error
Types ¶
type ErrCodeInterface ¶ added in v0.5.0
func GetCode ¶
func GetCode(err error) ErrCodeInterface
Click to show internal directories.
Click to hide internal directories.