Closed shuqingzai closed 1 year ago
Branch issue-48-_Question_在V3的版本中,没法控制当前异常是否发送报告 created!
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Is it possible to make the feature of https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 a configuration item? ? ?
是否可以把 https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 这个特性做成配置项??? @guanguans
我看看改一下。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Is it possible to make the feature of https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 a configuration item? ? ? @guanguans
OK, let me check it out.
Is your feature request related to a problem? Please describe.
V3
版本似乎会把所有异常上报,当然是可以从config
中配置,但是用户有时候需要的是同一个异常(可能是一个业务通用异常,但是按不同的 code 或 message 区分)进行不同的逻辑处理,甚至不需要上报这个异常,比如:Symfony\Component\HttpKernel\Exception\HttpException::class
http 响应异常,在httpStatusCode >= 500
我才需要上传,一些500
以下,比如参数验证错误,客户端请求参数错误,这些我无需上报,这在目前是没法实现Describe the solution you'd like
希望
V3
可以把异常上报的主动权交还给用户,就像以前V2
版,我自己在app/Exceptions/Handler.php
中决定,不是由扩展包对我的业务做决定Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.