From 0a752b9fab59a5b31295d6883420c04cb112e8ec Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 25 Sep 2016 18:27:03 +0200 Subject: [PATCH] test helpers: Always print stack trace --- src/restic/errors/fatal.go | 4 ++-- src/restic/test/helpers.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/restic/errors/fatal.go b/src/restic/errors/fatal.go index dce3a92b0..b61822c00 100644 --- a/src/restic/errors/fatal.go +++ b/src/restic/errors/fatal.go @@ -27,9 +27,9 @@ func IsFatal(err error) bool { return ok && e.Fatal() } -// Fatal returns an error which implements the Fataler interface. +// Fatal returns a wrapped error which implements the Fataler interface. func Fatal(s string) error { - return fatalError(s) + return Wrap(fatalError(s), "Fatal") } // Fatalf returns an error which implements the Fataler interface. diff --git a/src/restic/test/helpers.go b/src/restic/test/helpers.go index 22489df01..072cc4db9 100644 --- a/src/restic/test/helpers.go +++ b/src/restic/test/helpers.go @@ -41,7 +41,7 @@ func OKs(tb testing.TB, errs []error) { if err != nil { errFound = true _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error()) + fmt.Printf("\033[31m%s:%d: unexpected error: %+v\033[39m\n\n", filepath.Base(file), line, err.Error()) } } if errFound {