diff --git a/world.go b/world.go index 8594e96..5ab92dd 100644 --- a/world.go +++ b/world.go @@ -4,6 +4,7 @@ import ( "fmt" "log/slog" "math" + "runtime/debug" "time" "github.com/yohamta/donburi" @@ -219,6 +220,8 @@ func (w *world) run() { defer func() { if err := recover(); err != nil { w.exception(err) + slog.Error("世界运行异常", "error", err, "stack", string(debug.Stack())) + debug.PrintStack() } }() for range w.ticker.C {