Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/206885
Change subject: Cleaned up a few exceptions and IDE errors in BagOStuff ...................................................................... Cleaned up a few exceptions and IDE errors in BagOStuff Change-Id: I7ae88009f50c259c20572349b5d01480e36f7cb8 --- M includes/libs/objectcache/BagOStuff.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/206885/1 diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 5447ee7..7708eb1 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -119,10 +119,11 @@ * @param int $exptime Either an interval in seconds or a unix timestamp for expiry * @param int $attempts The amount of times to attempt a merge in case of failure * @return bool Success + * @throws InvalidArgumentException */ public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) { if ( !is_callable( $callback ) ) { - throw new Exception( "Got invalid callback." ); + throw new InvalidArgumentException( "Got invalid callback." ); } return $this->mergeViaLock( $key, $callback, $exptime, $attempts ); @@ -166,6 +167,7 @@ * @param mixed $value * @param int $exptime Either an interval in seconds or a unix timestamp for expiry * @return bool Success + * @throws Exception */ protected function cas( $casToken, $key, $value, $exptime = 0 ) { throw new Exception( "CAS is not implemented in " . __CLASS__ ); -- To view, visit https://gerrit.wikimedia.org/r/206885 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ae88009f50c259c20572349b5d01480e36f7cb8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits