webman-php / redis-queue

Message queue system written in PHP for webman.
https://www.workerman.net/webman
25 stars 9 forks source link

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

Open youfeed opened 5 months ago

youfeed commented 5 months ago

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 commented 5 months ago

主基础插件已提交修复 等待合并