Skip to content

Commit

Permalink
improve panic detection
Browse files Browse the repository at this point in the history
  • Loading branch information
flarco committed Sep 2, 2024
1 parent 9d2bf41 commit a263858
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/sling/sling_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ func cliInit(done chan struct{}) int {
// recover from panic
defer func() {
if r := recover(); r != nil {
env.SetTelVal("error", g.F("panic occurred! %#v\n%s", r, string(debug.Stack())))
info := string(debug.Stack())
env.SetTelVal("error", g.F("panic occurred! %#v\n%s", r, info))
g.Warn(g.F("panic occurred! %#v\n%s", r, info))
}
}()

Expand Down

0 comments on commit a263858

Please sign in to comment.