Documentation ¶
Overview ¶
Package errors provides an api similar to github.com/nuclio/nuclio/pkg/errors However we don't carry stack trace around for performance (see https://github.com/pkg/errors/issues/124)
Index ¶
- Variables
- func Cause(err error) error
- func Errorf(format string, args ...interface{}) error
- func GetErrorStack(err error, depth int) []error
- func GetErrorStackString(err error, depth int) string
- func Is(base, target error) bool
- func New(message string) error
- func PrintErrorStack(out io.Writer, err error, depth int)
- func RootCause(err error) error
- func Wrap(err error, message string) error
- func Wrapf(err error, format string, args ...interface{}) error
- type Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ShowLineInfo sets if we collect location information (file, line) // (getting location information makes creating error slower ~550ns vs 2ns) ShowLineInfo bool )
Functions ¶
func GetErrorStack ¶
GetErrorStack return stack of messges (oldest on top) if n == -1 returns the whole stack
func GetErrorStackString ¶
GetErrorStackString returns the error stack as a string
func PrintErrorStack ¶
PrintErrorStack prints the error stack into out up to depth levels If n == 1 then prints the whole stack
Types ¶
Click to show internal directories.
Click to hide internal directories.