Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( As = errors.As Is = errors.Is Cause = errors.Cause Unwrap = errors.Unwrap WithStack = errors.WithStack )
Export a number of functions or variables from pkg/errors. We want people to be able to use them, if only via the entrypoints we've vetted in this file.
Functions ¶
func EnsureStack ¶
EnsureStack checks if error has a stack, if not adds stack information, otherwise leaves the error unmodified. This can be used to forward an error without adding to the stack, but also adding a stack in case this information is missing.
func New ¶
New acts as pkg/errors.New does, producing a stack traced error, but supports interpolating of message parameters. Use this when you want the stack trace to start at the place you create the error.
func Sentinel ¶
Sentinel is used to create compile-time errors that are intended to be value only, with no associated stack trace.
func Wrap ¶
Wrap creates a new error from a cause, decorating the original error message with a prefix.
It differs from the pkg/errors Wrap/Wrapf by idempotently creating a stack trace, meaning we won't create another stack trace when there is already a stack trace present that matches our current program position.
Types ¶
type OperatorError ¶
func NewOperatorError ¶
func NewOperatorError(err error, retry bool, sentry bool) OperatorError
type StackTrace ¶
type StackTrace = errors.StackTrace
StackTrace should be aliases rather than newtype'd, so it can work with any of the functions we export from pkg/errors.
type StackTracer ¶
type StackTracer interface {
StackTrace() errors.StackTrace
}