mirror of
https://github.com/restic/restic.git
synced 2025-08-23 03:07:25 +00:00
Modernize error handling in local backend
* Stop prepending the operation name: it's already part of os.PathError, leading to repetitive errors like "Chmod: chmod /foo/bar: operation not permitted". * Use errors.Is to check for specific errors.
This commit is contained in:
@@ -27,6 +27,8 @@ var Wrapf = errors.Wrapf
|
||||
// returns nil.
|
||||
var WithMessage = errors.WithMessage
|
||||
|
||||
var WithStack = errors.WithStack
|
||||
|
||||
// Cause returns the cause of an error. It will also unwrap certain errors,
|
||||
// e.g. *url.Error returned by the net/http client.
|
||||
func Cause(err error) error {
|
||||
|
Reference in New Issue
Block a user