mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-01 18:33:04 +02:00
properly log unhandled panics.
This commit is contained in:
parent
6b39e8e0e8
commit
b49f545094
1 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue