Use InvalidArgumentException in ActivityUpdateJob
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 29 Jan 2016 19:56:04 +0000 (11:56 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 29 Jan 2016 19:56:04 +0000 (11:56 -0800)
Change-Id: Ib73c02868327d5e8f286bce79cdf44ebb1f47ff3

includes/jobqueue/jobs/ActivityUpdateJob.php

index f146e6e..13e36d8 100644 (file)
@@ -41,7 +41,8 @@ class ActivityUpdateJob extends Job {
                if ( $this->params['type'] === 'updateWatchlistNotification' ) {
                        $this->updateWatchlistNotification();
                } else {
-                       throw new Exception( "Invalid 'type' parameter '{$this->params['type']}'." );
+                       throw new InvalidArgumentException(
+                               "Invalid 'type' parameter '{$this->params['type']}'." );
                }
 
                return true;