更新运行时致命错误打印堆栈

This commit is contained in:
孟帅 2022-03-22 09:45:18 +08:00
parent 725a0ac0ab
commit 4dc278f9cb
2 changed files with 3 additions and 4 deletions

View File

@ -2,17 +2,16 @@ package main
import ( import (
"github.com/bufanyun/hotgo/boot" "github.com/bufanyun/hotgo/boot"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx" "github.com/gogf/gf/v2/os/gctx"
) )
func main() { func main() {
var ( var ctx = gctx.New()
ctx = gctx.New()
)
if err := boot.Main.RunWithError(ctx); err != nil { if err := boot.Main.RunWithError(ctx); err != nil {
g.Log().Fatal(ctx, err) g.Log().Fatal(ctx, gerror.Stack(err))
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB