10 "github.com/vapor/errors"
13 var wd, _ = os.Getwd()
15 func FatalErr(t testing.TB, err error) {
16 args := []interface{}{err}
17 for _, frame := range errors.Stack(err) {
19 if rel, err := filepath.Rel(wd, file); err == nil && !strings.HasPrefix(rel, "../") {
22 funcname := frame.Func[strings.IndexByte(frame.Func, '.')+1:]
23 s := fmt.Sprintf("\n%s:%d: %s", file, frame.Line, funcname)
24 args = append(args, s)