errors

package
v0.16.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package errors provides custom error types used within restic.

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var New = errors.New

New creates a new error based on message. Wrapped so that this package does not appear in the stack trace.

View Source
var WithStack = errors.WithStack
View Source
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.

View Source
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

func As(err error, tgt interface{}) bool

func Fatal

func Fatal(s string) error

Fatal returns an error that is marked fatal.

func Fatalf

func Fatalf(s string, data ...interface{}) error

Fatalf returns an error that is marked fatal.

func Is added in v0.12.0

func Is(x, y error) bool

func IsFatal

func IsFatal(err error) bool

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

func Unwrap(err error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL