summaryrefslogtreecommitdiff
path: root/includes/exception
diff options
context:
space:
mode:
Diffstat (limited to 'includes/exception')
-rw-r--r--includes/exception/MWExceptionHandler.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php
index c50b6c8c..a58705f6 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -486,6 +486,8 @@ TXT;
if ( $json !== false ) {
wfDebugLog( 'exception-json', $json, 'private' );
}
+
+ Hooks::run( 'LogException', array( $e, false ) );
}
}
@@ -501,7 +503,8 @@ TXT;
// The set_error_handler callback is independent from error_reporting.
// Filter out unwanted errors manually (e.g. when wfSuppressWarnings is active).
- if ( ( error_reporting() & $e->getSeverity() ) !== 0 ) {
+ $suppressed = ( error_reporting() & $e->getSeverity() ) === 0;
+ if ( !$suppressed ) {
$log = self::getLogMessage( $e );
if ( $wgLogExceptionBacktrace ) {
wfDebugLog( $channel, $log . "\n" . $e->getTraceAsString() );
@@ -515,5 +518,7 @@ TXT;
if ( $json !== false ) {
wfDebugLog( "$channel-json", $json, 'private' );
}
+
+ Hooks::run( 'LogException', array( $e, $suppressed ) );
}
}