-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
Improve initialization crash message #27138
Improve initialization crash message #27138
Conversation
Thank you for contributing to CiviCRM! ❤️ We will need to test and review the PR. 👷 Introduction for new contributors
Quick links for reviewers |
Sorry only meant to include the one commit . will remove the other tomorrow |
6944c4d
to
21b5cbe
Compare
As a deprecated function this is probably safe but giving merge-ready in case @totten has thoughts |
Yeah, I've read this a couple times -- and on the surface, it looked good. But when I tried to grok the overall effect (to figure out if it might change some other use-case in a problematic way), then my brain exploded. This is not because of the patch itself; rather, the surrounding context is messy. (Aside: I agree that OK, so trying again to analyze it... I suppose that
If the goal is "fidelity to
OTOH, I'm not sure that "fidelity to Recapping... in terms of contracts, it's maybe a bit regressive. But in terms of user-impacts, does it matter? Eh... |
3940240
to
de26444
Compare
Great work @totten! See what you think of this. Improvements, I think are:
I agree that this is a messy function. e.g. I have assumed that |
@artfulrobot Yeah, I think that updates makes more sense. I played around with it a bit... and while the overall murkiness of error-handling makes it hard to be sure, I think the patch had the appropriate affects. Test failure is unrelated/temporal. |
Overview
If there's an initialization crash, Civi will bring the whole site down and output an error message. This is rare, but a lot of eyes see the error on a busy website if it does happen.
Before
The output included dumped variables and error messages.
After
The output is simply an error reference which can be looked up wherever
error_log
outputs.Technical Details
This changes the behaviour of
CRM_Core_Error::debug()
which is deprecated anyway.It's really about avoiding public vardumps rather than a sensible logging improvement.
Using error_log because we might not have Civi::log() available in these weird/bad/early crashes.