Add MWExceptionRenderer class and decouple DBError
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 14 Sep 2016 03:57:54 +0000 (20:57 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 14 Sep 2016 18:53:55 +0000 (11:53 -0700)
commit00bee029718f3215396e984d04b9450bc3872503
treef45d44cc085f7b53a311ab1738ca5123b3fa5bea
parenta37ab7f4c46fdade705f9745c11bfb714cd3717e
Add MWExceptionRenderer class and decouple DBError

* This handles the work of showing exceptions so that
  MWException does not have too.
* Simplify the DBError classes to regular Exception
  classes. Lots of pointless prettification has been
  removed, but DBConnectionError still gets the usual
  special treatment of a fallback page and Google form.
* Remove hacky file cache fallback code that probably
  did not work.
* Make MWExceptionHandler::report() wrap
  MWExceptionExposer::output().
* Make MWException::runHooks() wrap
  MWExceptionExposer::runHooks().

Change-Id: I5dfdc84e94ddac65417226cf7c84513ebb9f9faa
autoload.php
includes/db/DatabaseError.php
includes/db/IDatabase.php
includes/db/loadbalancer/ILoadBalancer.php
includes/exception/MWException.php
includes/exception/MWExceptionHandler.php
includes/exception/MWExceptionRenderer.php [new file with mode: 0644]