fix: marked gcode.CodeInternalPanic for panic (#2860)

This commit is contained in:
Lonely
2023-08-14 09:53:13 +08:00
committed by GitHub
parent 35a326e169
commit ea6a773d60
14 changed files with 27 additions and 17 deletions

View File

@ -8,6 +8,8 @@ package gfcmd
import (
_ "github.com/gogf/gf/cmd/gf/v2/internal/packed"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"context"
@ -38,7 +40,7 @@ func (c *Command) Run(ctx context.Context) {
if err, ok := exception.(error); ok {
mlog.Print(err.Error())
} else {
panic(exception)
panic(gerror.NewCodef(gcode.CodeInternalPanic, "%+v", exception))
}
}
}()