In MWExceptionHandler::report(), catch all throwables

A PHP fatal error from MWExceptionRenderer::output() causes the
exception handler to be re-entered, with the original exception thrown
away. So, catch all throwables. That way we can see both error messages,
neither is thrown away.

Bug: T263911
Change-Id: Ie98438cbdd328fe295c9b5202d79edb0c8fb41c5
This commit is contained in:
Tim Starling 2020-12-15 17:51:52 +11:00
parent 5ebb7dd4d0
commit 95aafed56f

View file

@ -105,7 +105,7 @@ class MWExceptionHandler {
} else {
MWExceptionRenderer::output( $e, MWExceptionRenderer::AS_PRETTY );
}
} catch ( Exception $e2 ) {
} catch ( Throwable $e2 ) {
// Exception occurred from within exception handler
// Show a simpler message for the original exception,
// don't try to invoke report()