Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/ORES | master | +21 -6 | Better way to handle errors in Cache.php |
Details
Details
Related Objects
Related Objects
Event Timeline
Comment Actions
From: https://gerrit.wikimedia.org/r/#/c/294398/1/includes/Cache.php
I would suggest a different approach:
- define a member variable $errorHandler that contains a callback function.
- per default, this would throw a RuntimeException
- provide a setter for the callback function
- for batch mode, set it to a closure that odes nothing, or just logs output
That's clearer and more flexible, and it allows you to use the maintenancescript's output) function to report issues to the user.
Comment Actions
Change 299743 had a related patch set uploaded (by Ladsgroup):
Better way to handle errors in Cache.php