jenkins-bot has submitted this change and it was merged.
Change subject: Don't throw a plain \Exception
......................................................................
Don't throw a plain \Exception
Change-Id: I681387914c62d6cfa8048b5681825d4b9c0783cc
---
M includes/specials/SpecialGather.php
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialGather.php
b/includes/specials/SpecialGather.php
index 4b8b3dd..917110d 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -12,7 +12,7 @@
use \UsageException;
use \DerivativeRequest;
use \ApiMain;
-use \Exception;
+use \InvalidArgumentException;
/**
* Render a collection of articles.
@@ -110,8 +110,10 @@
*/
public function renderUserCollection( User $user, $id ) {
if ( !is_int( $id ) ) {
- throw new Exception( __METHOD__ . ' requires the second
parameter to be an integer, '
- . gettype( $id ) . ' given.' );
+ throw new InvalidArgumentException(
+ __METHOD__ . ' requires the second parameter to
be an integer, '
+ . gettype( $id ) . ' given.'
+ );
}
$collection = models\Collection::newFromApi( $id, $user );
--
To view, visit https://gerrit.wikimedia.org/r/200108
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I681387914c62d6cfa8048b5681825d4b9c0783cc
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits