rclone: github.com/ncw/rclone/lib/errors Index | Files

package errors

import "github.com/ncw/rclone/lib/errors"

Index

Package Files

errors.go

func Errorf Uses

func Errorf(format string, a ...interface{}) error

Errorf formats according to a format specifier and returns the string as a value that satisfies error.

func New Uses

func New(text string) error

New returns an error that formats as the given text.

func Walk Uses

func Walk(err error, f WalkFunc)

Walk invokes the given function for each error in the chain. If the provided functions returns true or no further cause can be found, the process is stopped and no further calls will be made.

The next error in the chain is determined by the following rules: - If the current error has a `Cause() error` method (github.com/pkg/errors),

the return value of this method is used.

- If the current error has a `Unwrap() error` method (golang.org/x/xerrors),

the return value of this method is used.

- Common errors in the Go runtime that contain an Err field will use this value.

type WalkFunc Uses

type WalkFunc func(error) bool

WalkFunc is the signature of the Walk callback function. The function gets the current error in the chain and should return true if the chain processing should be aborted.

Package errors imports 3 packages (graph) and is imported by 1 packages. Updated 2019-06-14. Refresh now. Tools for package owners.