Documentation ¶
Overview ¶
Package errors provides the common infrastructure for managing errors. It is primarily a wrapper around github.com/pkg/errors package. See https://godoc.org/github.com/pkg/errors for usage instructions.
While it is possible for most packages to use this package without needing the underlying package it is wrapping, certain usecases (such as interacting with the recorded stack trace) cannot avoid leakage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cause ¶
Cause returns the underlying cause of the error, if possible. See https://godoc.org/github.com/pkg/errors#Cause for further details.
func Errorf ¶
Errorf formats according to a format specifier and returns the string as a value that satisfies error. See https://godoc.org/github.com/pkg/errors#Errorf for further details
func New ¶
New returns an error with the supplied message. See https://godoc.org/github.com/pkg/errors#New for further details
func ReportToSentry ¶
ReportToSentry reports err to the configured sentry server. Optionally, specifying a non-nil `r` will include information in the report about the current http request.
func Wrap ¶
Wrap returns an error annotating err with message. If err is nil, Wrap returns nil. See https://godoc.org/github.com/pkg/errors#Wrap for more details.
Types ¶
type StackTracer ¶
type StackTracer interface {
StackTrace() errors.StackTrace
}
StackTracer represents a type (usually an error) that can provide a stack trace.