redis-queue icon indicating copy to clipboard operation
redis-queue copied to clipboard

如何优雅的抛出异常?

Open youfeed opened this issue 1 year ago • 1 comments

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 avatar Feb 27 '24 04:02 youfeed