Fix spacing properly this time.
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 17 Feb 2009 21:14:34 +0000 (21:14 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 17 Feb 2009 21:14:34 +0000 (21:14 +0000)
includes/Exception.php

index 2ccdcc9..199011d 100644 (file)
@@ -273,37 +273,37 @@ function wfInstallExceptionHandler() {
 function wfReportException( Exception $e ) {
        $cmdLine = MWException::isCommandLine();
        if ( $e instanceof MWException ) {
-        try {
-                $e->report();
-        } catch ( Exception $e2 ) {
-               // Exception occurred from within exception handler
-               // Show a simpler error message for the original exception,
-               // don't try to invoke report()
-               $message = "MediaWiki internal error.\n\n";
-               if ( $GLOBALS['wgShowExceptionDetails'] )
-                       $message .= "Original exception: " . $e->__toString();
-               $message .= "\n\nException caught inside exception handler";
-               if ( $GLOBALS['wgShowExceptionDetails'] )
-                       $message .= ": " . $e2->__toString();
-               $message .= "\n";
+               try {
+                       $e->report();
+               } catch ( Exception $e2 ) {
+                       // Exception occurred from within exception handler
+                       // Show a simpler error message for the original exception,
+                       // don't try to invoke report()
+                       $message = "MediaWiki internal error.\n\n";
+                       if ( $GLOBALS['wgShowExceptionDetails'] )
+                               $message .= "Original exception: " . $e->__toString();
+                       $message .= "\n\nException caught inside exception handler";
+                       if ( $GLOBALS['wgShowExceptionDetails'] )
+                               $message .= ": " . $e2->__toString();
+                       $message .= "\n";
+                       if ( $cmdLine ) {
+                               wfPrintError( $message );
+                       } else {
+                               echo nl2br( htmlspecialchars( $message ) ). "\n";
+                               }
+               }
+       } else {
+               $message = "Unexpected non-MediaWiki exception encountered, of type \"" . get_class( $e ) . "\"\n" .
+                       $e->__toString() . "\n";
+               if ( $GLOBALS['wgShowExceptionDetails'] ) {
+                       $message .= "\n" . $e->getTraceAsString() ."\n";
+               }
                if ( $cmdLine ) {
                        wfPrintError( $message );
                } else {
                        echo nl2br( htmlspecialchars( $message ) ). "\n";
-                       }
                }
-       } else {
-        $message = "Unexpected non-MediaWiki exception encountered, of type \"" . get_class( $e ) . "\"\n" .
-                $e->__toString() . "\n";
-        if ( $GLOBALS['wgShowExceptionDetails'] ) {
-                $message .= "\n" . $e->getTraceAsString() ."\n";
-        }
-        if ( $cmdLine ) {
-                        wfPrintError( $message );
-                } else {
-                        echo nl2br( htmlspecialchars( $message ) ). "\n";
-                }
-        }
+       }
 }
 
 /**