mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
properly log unhandled panics.
This commit is contained in:
@@ -20,6 +20,14 @@ import (
|
||||
)
|
||||
|
||||
func Execute() error {
|
||||
// properly log unhandled panics
|
||||
defer func() {
|
||||
panicVal := recover()
|
||||
if panicVal != nil {
|
||||
log.Panic().Msgf("%v", panicVal)
|
||||
}
|
||||
}()
|
||||
|
||||
return root.Execute()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user