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 ¶
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 CombineErrors ¶
CombineErrors combines multiple errors into a single error after filtering out any nil values. If no errors are passed, it returns nil. If one error is passed, it simply returns that same error.
func IsFatal ¶
IsFatal returns true if err is a fatal message that should be printed to the user. Then, the program should exit.
Types ¶
This section is empty.