No such method Exception::getText()
authorErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 3 Feb 2015 18:18:56 +0000 (10:18 -0800)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 3 Feb 2015 19:09:54 +0000 (11:09 -0800)
It looks like a recent change converted this try/catch
statement from MWException to Exception, unfortunatly it
is still calling a method that only exists on MWException.

We arn't doing anything with the exception but exiting.  Lets
just allow the exception to be uncaught and fail naturally. The
uncaught exception will still output an error and return
a non-0 exit code.

Change-Id: I3e0e9d283c255d2aba8139d675943e93d7cb021a

maintenance/doMaintenance.php

index c93a971..cc2167e 100644 (file)
@@ -98,23 +98,18 @@ $maintenance->finalSetup();
 require_once "$IP/includes/Setup.php";
 
 // Do the work
-try {
-       $maintenance->execute();
+$maintenance->execute();
 
-       // Potentially debug globals
-       $maintenance->globals();
+// Potentially debug globals
+$maintenance->globals();
 
-       // Perform deferred updates.
-       DeferredUpdates::doUpdates( 'commit' );
+// Perform deferred updates.
+DeferredUpdates::doUpdates( 'commit' );
 
-       // log profiling info
-       wfLogProfilingData();
+// log profiling info
+wfLogProfilingData();
 
-       // Commit and close up!
-       $factory = wfGetLBFactory();
-       $factory->commitMasterChanges();
-       $factory->shutdown();
-} catch ( Exception $mwe ) {
-       echo $mwe->getText();
-       exit( 1 );
-}
+// Commit and close up!
+$factory = wfGetLBFactory();
+$factory->commitMasterChanges();
+$factory->shutdown();