From 0492eabff1a973f57049295d1477e8cace93a088 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 11 Feb 2017 14:24:11 +0100 Subject: [PATCH] Improve error messages --- src/restic/repository/repository.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/restic/repository/repository.go b/src/restic/repository/repository.go index 45046dac2..fe10ef9bf 100644 --- a/src/restic/repository/repository.go +++ b/src/restic/repository/repository.go @@ -56,12 +56,12 @@ func (r *Repository) LoadAndDecrypt(t restic.FileType, id restic.ID) ([]byte, er h := restic.Handle{Type: t, Name: id.String()} buf, err := backend.LoadAll(r.be, h) if err != nil { - debug.Log("error loading %v: %v", id.Str(), err) + debug.Log("error loading %v: %v", h, err) return nil, err } if t != restic.ConfigFile && !restic.Hash(buf).Equal(id) { - return nil, errors.New("invalid data returned") + return nil, errors.Errorf("%v: invalid data returned", h) } // decrypt