Documentation ¶
Index ¶
- Variables
- func Friendly(err error) error
- func Wrap(cause error, friendly string) error
- func Wrapf(cause error, friendly string, a ...interface{}) error
- type Error
- func (e Error) Cause() error
- func (e Error) Err() error
- func (e Error) Error() string
- func (e Error) Friendly() error
- func (e Error) WithCause(err error) Error
- func (e Error) WithCauseString(err string) Error
- func (e Error) WithFriendly(err error) Error
- func (e Error) WithFriendlyString(err string) Error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUserError = errors.New("Something went wrong")
Functions ¶
func Friendly ¶
Friendly takes any error and will return the first user-friendly error it finds as it traverses up through the linked list. If there are no user-friendly causes found, nil is returned.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (Error) WithCauseString ¶
WithCauseString sets the internal non-user-safe cause of the error.
func (Error) WithFriendly ¶
WithFriendly sets the user-safe cause of the error.
func (Error) WithFriendlyString ¶
WithFriendlyString sets the user-safe cause of the error.
Click to show internal directories.
Click to hide internal directories.