Upgraded User::saveSettings logged errors to exceptions
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 10 Jul 2015 07:54:40 +0000 (00:54 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 10 Jul 2015 08:41:29 +0000 (01:41 -0700)
* This gives more visibility and the error rate is not
  extreme (and mostly affects certain users due to
  usage patterns).

Change-Id: I3eae28a584e4db8ae40ae80087a97c416b3bd3e8

includes/User.php

index 63c0d37..005fc7d 100644 (file)
@@ -3679,12 +3679,10 @@ class User implements IDBAccessObject {
                        $this->clearSharedCache();
                        // User was changed in the meantime or loaded with stale data
                        $from = ( $this->queryFlagsUsed & self::READ_LATEST ) ? 'master' : 'slave';
-                       MWExceptionHandler::logException( new MWException(
+                       throw new MWException(
                                "CAS update failed on user_touched for user ID '{$this->mId}' (read from $from);" .
                                "the version of the user to be saved is older than the current version."
-                       ) );
-
-                       return;
+                       );
                }
 
                $this->mTouched = $newTouched;