2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-18 08:42:22 +00:00
restic/src/restic/errors/wrap.go

21 lines
590 B
Go
Raw Normal View History

2016-09-01 20:17:37 +00:00
package errors
import "github.com/pkg/errors"
// Cause returns the cause of an error.
func Cause(err error) error {
return errors.Cause(err)
}
// New creates a new error based on message. Wrapped so that this package does
// not appear in the stack trace.
var New = errors.New
2016-09-01 20:17:37 +00:00
// Errorf creates an error based on a format string and values. Wrapped so that
// this package does not appear in the stack trace.
var Errorf = errors.Errorf
2016-09-01 20:17:37 +00:00
// Wrap wraps an error retrieved from outside of restic. Wrapped so that this
// package does not appear in the stack trace.
var Wrap = errors.Wrap