BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/313626
Change subject: MWExceptionHandler: Restore delegation to MWException::report
......................................................................
MWExceptionHandler: Restore delegation to MWException::report
Many MWException subclasses override MWException::report to do things
like special logging and setting the HTTP response status code. We need
to keep calling those methods until MWExceptionRenderer knows how to
handle all of them.
Bug: T147098
Change-Id: I2c90e2d9e9b019357458c7e14a3d602b591c6f5b
---
M includes/exception/MWExceptionHandler.php
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/26/313626/1
diff --git a/includes/exception/MWExceptionHandler.php
b/includes/exception/MWExceptionHandler.php
index 8359846..cf3c0e0 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -62,7 +62,14 @@
protected static function report( $e ) {
try {
// Try and show the exception prettily, with the normal
skin infrastructure
- MWExceptionRenderer::output( $e,
MWExceptionRenderer::AS_PRETTY );
+ if ( $e instanceof MWException ) {
+ // Delegate to MWException until all subclasses
are handled by
+ // MWExceptionRenderer.
+ $e->render();
+ } else {
+ MWExceptionRenderer::output(
+ $e, MWExceptionRenderer::AS_PRETTY );
+ }
} catch ( Exception $e2 ) {
// Exception occurred from within exception handler
// Show a simpler message for the original exception,
--
To view, visit https://gerrit.wikimedia.org/r/313626
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c90e2d9e9b019357458c7e14a3d602b591c6f5b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits