Fix for r113993: don't log UsageException instances
authorTim Starling <tstarling@wikimedia.org>
Tue, 8 May 2012 01:02:55 +0000 (11:02 +1000)
committerTim Starling <tstarling@wikimedia.org>
Tue, 8 May 2012 01:05:09 +0000 (11:05 +1000)
Change-Id: I205252534fcf7a0ee486938123c1e15cd036f4f1

includes/api/ApiMain.php

index 7f412bc..10540a3 100644 (file)
@@ -362,7 +362,7 @@ class ApiMain extends ApiBase {
                        $this->executeAction();
                } catch ( Exception $e ) {
                        // Log it
-                       if ( $e instanceof MWException ) {
+                       if ( !( $e instanceof UsageException ) ) {
                                wfDebugLog( 'exception', $e->getLogMessage() );
                        }