forked from TrueCloudLab/restic
test helpers: Always print stack trace
This commit is contained in:
parent
eeec0d63c2
commit
0a752b9fab
2 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue