Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
Errorf is a convenience function mimics fmt.Errorf, but returns a contextError with a stack trace too.
func New ¶
New creates a new error with a context and a stack trace. Returns a contextError pointer.
func RootCause ¶
RootCause returns the root error that caused the chain or errors to being with. It repeatedly tries to unwrap the error until it can no longer be unwrapped.
func Wrapf ¶
Wrapf takes in an error, a string with optional formatting options, and returns an error that wraps the input error. The returned error can be unwrapped using the errors.Unwrap() method.
Under the hood, Wrapf returns a ContextError that stores both the original error and the formatted string.
Types ¶
This section is empty.