Documentation ¶
Index ¶
- func AppendError(errs []error, newerrs ...error) []error
- func Errorf(format string, a ...interface{}) error
- func NewError(msg string) error
- func ToError(errs []error) error
- func Wrap(msg string, errs ...error) error
- func Wrapf(err error, format string, a ...interface{}) error
- type CodeError
- type Error
- type ErrorWrapper
- type ErrorsWrapper
- type GoatError
- type JSONError
- type MessageError
- type TrackedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendError ¶
AppendError append error to error collection
func Errorf ¶
Errorf formats according to a format specifier and returns the string as a value that satisfies error.
func NewError ¶
NewError formats according to a format specifier and returns the string as a value that satisfies error.
func ToError ¶
ToError return error object if error list is not empty or nil. Otherwise return error object.
Types ¶
type CodeError ¶
type CodeError interface {
ErrorCode() int
}
CodeError represent interface for error with code
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is goat error object
func (*Error) ErrorMessage ¶
ErrorMessage return error json tree
type ErrorWrapper ¶
type ErrorWrapper interface {
Unwrap() error
}
ErrorWrapper represent interface for error wrapper
type ErrorsWrapper ¶
type ErrorsWrapper interface {
UnwrapAll() []error
}
ErrorsWrapper represent interface for error wrapper
type GoatError ¶
type GoatError interface { JSONError CodeError TrackedError ErrorsWrapper }
GoatError represent interface for goat error
type JSONError ¶
type JSONError interface {
ErrorJSON() string
}
JSONError represent interface for error serialized to json
type MessageError ¶
type MessageError interface {
ErrorMessage() string
}
MessageError represent interface for error with message
type TrackedError ¶
type TrackedError interface {
Stack() string
}
TrackedError is described tracked errors interface