diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-11 21:30:27 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-11 22:39:17 +1100 |
commit | cfe3605e6b29e23db8dca9eedecc58cb13341587 (patch) | |
tree | cff98f9663f184e0979a65135dfd6ab7078744a3 /pkg/gui/gui.go | |
parent | 3a607061a2303d9f45d308de652fbebe7300b43c (diff) |
use go-errors package to display stacktrace of errors that cause panics
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index ed7cfba0f..59cfd3a8b 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -6,7 +6,6 @@ import ( // "io" // "io/ioutil" - "errors" "io/ioutil" "log" "os" @@ -14,6 +13,8 @@ import ( "strings" "time" + "github.com/go-errors/errors" + // "strings" "github.com/fatih/color" @@ -568,7 +569,9 @@ func (gui *Gui) RunWithSubprocesses() { gui.SubProcess.Stdin = nil gui.SubProcess = nil } else { - log.Panicln(err) + newErr := errors.Wrap(err, 0) + stackTrace := newErr.ErrorStack() + log.Panicln(stackTrace) } } } |