Documentation
¶
Overview ¶
Package xerrors contains extensions to the standard library package errors.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithStack ¶
WithStack returns an error that wraps err and adds the call stack of the call to WithStack to Error(). If err is nil or already has a stack attached, returns err.
Example ¶
err := WithStack(errors.New("foo")) fmt.Println(strings.Join(strings.Split(err.Error(), "\n")[:3], "\n"))
Output: foo github.com/bradenaw/juniper/xerrors.ExampleWithStack(...)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.