Page MenuHomePhabricator

More robust way of handling errors in Cache.php
Closed, ResolvedPublic

Event Timeline


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.

Halfak triaged this task as Low priority.Jul 5 2016, 2:18 PM

Change 299743 had a related patch set uploaded (by Ladsgroup):
Better way to handle errors in Cache.php

Change 299743 merged by jenkins-bot:
Better way to handle errors in Cache.php