Glaisher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/293336

Change subject: Show request id in Exception pages even if 
$wgShowExceptionDetails is false
......................................................................

Show request id in Exception pages even if $wgShowExceptionDetails is false

Bug: T137277
Change-Id: I5ff7e4ce0336616f8a9bcc39031a0a032bd9a931
---
M includes/exception/MWExceptionHandler.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/293336/1

diff --git a/includes/exception/MWExceptionHandler.php 
b/includes/exception/MWExceptionHandler.php
index 63adc29..e4ff5f3 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -93,10 +93,11 @@
                                }
                        }
                } else {
-                       $message = "Exception encountered, of type \"" . 
get_class( $e ) . "\"";
-
-                       if ( $wgShowExceptionDetails ) {
-                               $message .= "\n" . self::getLogMessage( $e ) . 
"\nBacktrace:\n" .
+                       if ( !$wgShowExceptionDetails ) {
+                               $message = self::getPublicLogMessage( $e );
+                       } else {
+                               $message = self::getLogMessage( $e ) .
+                                       "\nBacktrace:\n" .
                                        self::getRedactedTraceAsString( $e ) . 
"\n";
                        }
 
@@ -492,7 +493,7 @@
                $type = get_class( $e );
                return '[' . $reqId . '] '
                        . gmdate( 'Y-m-d H:i:s' ) . ': '
-                       . 'Fatal exception of type ' . $type;
+                       . 'Fatal exception of type "' . $type . '"';
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/293336
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ff7e4ce0336616f8a9bcc39031a0a032bd9a931
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to