SpecialRunJobs: delegate error handling to MWExceptionHandler
authorBryan Davis <bd808@wikimedia.org>
Thu, 14 Apr 2016 20:08:38 +0000 (14:08 -0600)
committerBryan Davis <bd808@wikimedia.org>
Thu, 14 Apr 2016 20:08:38 +0000 (14:08 -0600)
Make the custom error handler that is installed to suppress Cookie
header errors delegate unhandled errors to the default MediaWiki error
handler. This will preserve fatal error logging for errors raised by
jobs.

Bug: T89169
Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20

includes/specials/SpecialRunJobs.php

index 2312f76..ce5533f 100644 (file)
@@ -94,8 +94,11 @@ class SpecialRunJobs extends UnlistedSpecialPage {
                                if ( strpos( $errstr, 'Cannot modify header information' ) !== false ) {
                                        return true; // bug T115413
                                }
-                               // Delegate unhandled errors to the default handlers
-                               return false;
+                               // Delegate unhandled errors to the default MediaWiki handler
+                               // so that fatal errors get proper logging (T89169)
+                               return call_user_func_array(
+                                       'MWExceptionHandler::handleError', func_get_args()
+                               );
                        } );
                }