-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Implement catching for all Errors - ref Magento issue #23350 #25250
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
Conversation
Hi @miszyman. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@@ -269,6 +269,8 @@ public function run(AppInterface $application) | |||
} | |||
} catch (\Exception $e) { | |||
$this->terminate($e); | |||
} catch (\Error $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just change line 270 to } catch (\Throwable $e) {
to make sure we catch everything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed - however to be honest I thought about it but I left it like that for better visibility so that the Exception catching is left intact, as that is more common knowledge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @miszyman. Thanks for collaboration.
Please take a look at review comments
@VladimirZaets updated |
Hi @VladimirZaets, thank you for the review. |
✔️ QA Passed |
@magento run all tests |
@magento run all tests |
@magento run all tests |
The PR is under architectural review now. Please be patient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is approved by Architects
Hi @slavvka, thank you for the review. |
Hi @miszyman, thank you for your contribution! |
Description (*)
Leveraging PHP7+ Throwables (https://www.php.net/manual/en/class.throwable.php) to enable catching ALL possible errors as such might expose confidential information such passwords.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)