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
Catch Exception instead of Throwable #147
Conversation
Looks like even this broke the test so I'll have to spend a bit more time on it... Still though this is not the first time where I saw this lib failing with simple connection closed, hiding the real issue completely. So I do believe something should be changed. |
Good catch, thanks 👍 |
Well guess what... those errors that popped up now are genuine PHP errors that were always there just completely hidden. The first one (and I'm really unsure how to fix it) is here. |
@prolic Would you mind taking a look at this? From the code I really have no idea what your intention was. |
Yes, will do. |
Pull Request Test Coverage Report for Build 795
💛 - Coveralls |
Don't merge yet, I wanna check this again this weekend or so. (Quite busy now.) |
Perfect. Thanks for your help
…On Mon, Nov 2, 2020, 18:59 Jáchym Toušek ***@***.***> wrote:
Don't merge yet, I wanna check this again this weekend or so. (Quite busy
now.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAJPD7QBYI5BWXSJ5JO5TSN4TSTANCNFSM4S43SH7Q>
.
|
When trying this lib together with amphp v3 I ran into a problem where a type error of passing a wrong argument somewhere was completely hidden and the test failed with simple "Connection closed" exception with no further indication of what went wrong.
After a while I found out that the type error was caught here and completely hidden by this library's error handling. In my opinion it's better to not catch
ErrorException
- those tend to be real bugs that you want to see right away.Personally I'd be much more careful with catching
Exception
as well but that would require more knowledge.