Open shuqingzai opened 1 year ago
Hello @shuqingzai. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! 你好 @shuqingzai。我们喜欢您的提案/反馈,并希望您或其他社区成员通过拉取请求做出贡献。我们提前感谢您的贡献,并期待对其进行审查。
GF 文档中重点提示,在 HTTP 执行流程参考:异常处理 无需自行对 panic 进行处理,内部会自动处理,但是在使用 HOOK事件回调 特性时,panic 并未得到处理
Hook 处理参考:https://github.com/gogf/gf/blob/afeca8cf9dc8bbb7d0cd12f5ff9066295ab28483/net/ghttp/ghttp_server_handler.go#L113 基本都是调用 https://github.com/gogf/gf/blob/afeca8cf9dc8bbb7d0cd12f5ff9066295ab28483/net/ghttp/ghttp_server_router_hook.go#L66 ,这个方法针对 GF 内置的几个 panic 控制流程的标识符有特殊处理,其他默认往上抛,这会导致使用与文档描述不符
1. What version of
Go
and system type/arch are you using?2. What version of
GoFrame
are you using?3. Can this issue be re-produced with the latest release?
是的
4. What did you do?
5. What did you expect to see?
6. What did you see instead?