Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何优雅的抛出异常? #14

Open
youfeed opened this issue Feb 27, 2024 · 1 comment
Open

如何优雅的抛出异常? #14

youfeed opened this issue Feb 27, 2024 · 1 comment

Comments

@youfeed
Copy link

youfeed commented Feb 27, 2024

throw new \Excption('异常');
这样异常给redis弄了一堆报错打印

尝试以下操作

1. config/app.php

debug=>false
error_reporting=>1024

这个是webman的错误打印配置

2.尝试使用trigger_error("超时重试2",E_USER_NOTICE)

还是会打印错误堆栈

找寻源码 webman/queue 是对 workerman/redis-queue的优雅封装,搞不定

因为我已经选择主动抛出异常重试,堆栈信息是否保存到redis起码可选的吧~ redis - fail表体积爆炸

@youfeed youfeed closed this as completed Feb 27, 2024
@youfeed youfeed reopened this Feb 27, 2024
@youfeed
Copy link
Author

youfeed commented Feb 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant