Documentation
¶
Overview ¶
Package xerrors contains the utility for errors.
Index ¶
- Variables
- func IsContinue(err error) bool
- func IsDuplicate(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplement(err error) bool
- func WrapContinue(format string, args ...interface{}) error
- func WrapDuplicate(format string, args ...interface{}) error
- func WrapNotFound(format string, args ...interface{}) error
- func WrapNotImplement(format string, args ...interface{}) error
- func Wrapf(err error, format string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotImplement defines the function is not impelement ErrNotImplement = errors.New("NotImplement") // ErrNotFound defines the object is not found ErrNotFound = errors.New("ObjectNotFound") // ErrDuplicate defines the object is duplicate ErrDuplicate = errors.New("DuplicateObject") // ErrContinue defines the err can continue ErrContinue = errors.New("Continue") )
View Source
var As = errors.As
As alias the errors.As
View Source
var Errorf = fmt.Errorf
Errorf alias the Errorf
View Source
var Is = errors.Is
Is alias the errors.Is
View Source
var New = errors.New
New alias the errors.New
Functions ¶
func IsDuplicate ¶
IsDuplicate return true if the error is duplicate
func IsNotFound ¶
IsNotFound return true if the error is object not found
func IsNotImplement ¶
IsNotImplement return true if the error is not implement
func WrapContinue ¶
WrapContinue return the Continue error
func WrapDuplicate ¶
WrapDuplicate return the wraped duplicate error
func WrapNotFound ¶
WrapNotFound return the wraped not found error
func WrapNotImplement ¶
WrapNotImplement return the not implement error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.