From 0eb750b76af1dfc7de96a32adda09f4a87826ab0 Mon Sep 17 00:00:00 2001 From: walker Date: Thu, 19 Oct 2023 13:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=96=E7=95=8C=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E5=BC=82=E5=B8=B8=E6=97=B6=E7=9A=84=E5=A0=86=E6=A0=88?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- world.go | 3 +++ 1 file changed, 3 insertions(+) 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 {