X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiContinuationManager.php;h=7da8ed9a5b196de6ee1fdb5c4439dacb1e8c1b04;hb=d8653d2758016c6e13acefca55f38468eb32f30b;hp=19e2453944b132a695a80400b4e525d65d3dfc0d;hpb=75d8b6c6cd2b70d98242e1246678c12e973a5dfa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiContinuationManager.php b/includes/api/ApiContinuationManager.php index 19e2453944..7da8ed9a5b 100644 --- a/includes/api/ApiContinuationManager.php +++ b/includes/api/ApiContinuationManager.php @@ -40,7 +40,7 @@ class ApiContinuationManager { * @param ApiBase $module Module starting the continuation * @param ApiBase[] $allModules Contains ApiBase instances that will be executed * @param array $generatedModules Names of modules that depend on the generator - * @throws UsageException + * @throws ApiUsageException */ public function __construct( ApiBase $module, array $allModules = [], array $generatedModules = [] @@ -57,10 +57,7 @@ class ApiContinuationManager { if ( $continue !== '' ) { $continue = explode( '||', $continue ); if ( count( $continue ) !== 2 ) { - throw new UsageException( - 'Invalid continue param. You should pass the original value returned by the previous query', - 'badcontinue' - ); + throw ApiUsageException::newWithMessage( $module->getMain(), 'apierror-badcontinue' ); } $this->generatorDone = ( $continue[0] === '-' ); $skip = explode( '|', $continue[1] );