-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add support for catching throwables in App/Bootstrap #23350
Comments
Hi @DuckThom. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @DuckThom do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
For quick reference, it's about this line: https://github.com/magento/magento2/blob/2.3-develop/lib/internal/Magento/Framework/App/Bootstrap.php#L269 |
Summary (*)
I noticed that the inner try/catch in the
run
method inlib/internal/App/Bootstrap.php
does not catch throwables. I was wondering if there is any downside in adding a catch for a\Throwable
.Examples (*)
If an error is thrown (for example, a TypeError) it currently shows a browser generic 500 error.
Proposed solution
I would suggest adding the following catch block for minimal changes as a quite a lot of other methods, like the
catchException
method for example, expect an instance of \Exception, and a TypeError isn't of that type.The text was updated successfully, but these errors were encountered: