Tweaked the message for non-MW exceptions
[lhc/web/wiklou.git] / includes / exception / MWExceptionHandler.php
index 83801b6..d49bdef 100644 (file)
@@ -83,8 +83,7 @@ class MWExceptionHandler {
                                }
                        }
                } else {
-                       $message = "Unexpected non-MediaWiki exception encountered, of type \"" .
-                               get_class( $e ) . "\"";
+                       $message = "Exception encountered, of type \"" . get_class( $e ) . "\"";
 
                        if ( $wgShowExceptionDetails ) {
                                $message .= "\n" . MWExceptionHandler::getLogMessage( $e ) . "\nBacktrace:\n" .
@@ -493,5 +492,10 @@ TXT;
                } else {
                        wfDebugLog( 'error', $log );
                }
+
+               $json = self::jsonSerializeException( $e, false, FormatJson::ALL_OK );
+               if ( $json !== false ) {
+                       wfDebugLog( 'error-json', $json, 'private' );
+               }
        }
 }