* Split off DB load monitoring logic into a LoadMonitor class hierarchy, to allow...
[lhc/web/wiklou.git] / includes / Exception.php
index 2ba2946..7482020 100644 (file)
@@ -164,13 +164,13 @@ class MWException extends Exception {
         */
        function report() {
                global $wgCommandLineMode;
+               $log = $this->getLogMessage();
+               if ( $log ) {
+                       wfDebugLog( 'exception', $log );
+               }
                if ( $wgCommandLineMode ) {
                        fwrite( STDERR, $this->getText() );
                } else {
-                       $log = $this->getLogMessage();
-                       if ( $log ) {
-                               wfDebugLog( 'exception', $log );
-                       }
                        $this->reportHTML();
                }
        }