Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cause ¶
Cause returns the underlying cause of the error, if possible. An error value has a cause if it implements the following interface:
type causer interface { Cause() error }
If the error does not implement Cause, the original error will be returned. If the error is nil, nil will be returned without further investigation.
func Errorf ¶
Errorf formats according to a format specifier and returns the string as a value that satisfies error. Errorf also records the stack trace at the point it was called.
func New ¶
New returns an error with the supplied message. New also records the stack trace at the point it was called.
func WithStack ¶
WithStack annotates err with a stack trace at the point WithStack was called. If err is nil, WithStack returns nil.
Types ¶
type ErrorList ¶
type ErrorList struct { Errors []error // contains filtered or unexported fields }
ErrorList is a wrapper over list of errors It implements error interface
func (*ErrorList) WithStack ¶
WithStack annotates ErrorList with a new message and stack trace of caller.
func (*ErrorList) WithStackf ¶
WithStackf annotates ErrorList with the format specifier and stack trace of caller.