mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
properly log unhandled panics.
This commit is contained in:
parent
6b39e8e0e8
commit
b49f545094
@ -20,6 +20,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Execute() error {
|
func Execute() error {
|
||||||
|
// properly log unhandled panics
|
||||||
|
defer func() {
|
||||||
|
panicVal := recover()
|
||||||
|
if panicVal != nil {
|
||||||
|
log.Panic().Msgf("%v", panicVal)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
return root.Execute()
|
return root.Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user