Documentation ¶
Index ¶
- type Error
- func CreateError(err error, code ErrorCode, msg string) Error
- func Errorf(code ErrorCode, fmt string, args ...interface{}) Error
- func GetError(err error) (Error, bool)
- func New(code ErrorCode, msg string) Error
- func WithMessage(code ErrorCode, err error, msg string) Error
- func Wrap(code ErrorCode, cause error, msg string) Error
- func Wrapf(code ErrorCode, cause error, fmt string, args ...interface{}) Error
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error interface { error // Status returns the error code ErrorCode() ErrorCode // Generate log msg GenerateLogMsg() string // Generate client error msg GenerateClientErrorMsg() string }
Error extends error with additional context
func CreateError ¶
CreateError returns custom error
func WithMessage ¶
WithMessage returns a new Error
Click to show internal directories.
Click to hide internal directories.