Documentation
¶
Overview ¶
Package errors provides custom error types used within restic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Errorf = errors.Errorf
Errorf creates an error based on a format string and values. Wrapped so that this package does not appear in the stack trace.
var New = errors.New
New creates a new error based on message. Wrapped so that this package does not appear in the stack trace.
var WithStack = errors.WithStack
WithStack annotates err with a stack trace at the point WithStack was called. If err is nil, WithStack returns nil.
var Wrap = errors.Wrap
Wrap wraps an error retrieved from outside of restic. Wrapped so that this package does not appear in the stack trace.
var Wrapf = errors.Wrapf
Wrapf returns an error annotating err with the format specifier. If err is nil, Wrapf returns nil.
Functions ¶
func As ¶ added in v0.14.0
As finds the first error in err's tree that matches target, and if one is found, sets target to that error value and returns true. Otherwise, it returns false.
func IsFatal ¶
IsFatal returns true if err is a fatal message that should be printed to the user. Then, the program should exit.
func Unwrap ¶ added in v0.15.0
Unwrap returns the result of calling the Unwrap method on err, if err's type contains an Unwrap method returning error. Otherwise, Unwrap returns nil.
Unwrap only calls a method of the form "Unwrap() error". In particular Unwrap does not unwrap errors returned by Join.
Types ¶
This section is empty.