array( 'editconflict' ),
array( 'emptynewsection' ),
array( 'unknownerror', 'retval' ),
+ array( 'code' => 'nosuchsection', 'info' => '' ), "There is no section section.", ''
+ array( 'code' => 'invalidsection', 'info' => 'The section parameter must be set to an integer or \'new\'' ),
) );
}
public function getPossibleErrors() {
return array_merge( parent::getPossibleErrors(), array(
array( 'readonlytext' ),
+ array( 'code' => 'unknown_format', 'info' => 'Unrecognized format: format' ),
+ array( 'code' => 'unknown_action', 'info' => 'The API requires a valid action parameter' ),
+ array( 'code' => 'maxlag', 'info' => 'Waiting for host: x seconds lagged' ),
+ array( 'code' => 'maxlag', 'info' => 'Waiting for a database server: x seconds lagged' ),
) );
}
public function getDescription() {
return 'This module parses wikitext and returns parser output';
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'code' => 'params', 'info' => 'The page parameter cannot be used together with the text and title parameters' ),
+ array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ),
+ array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ),
+ array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ),
+ ) );
+ }
protected function getExamples() {
return array (
public function getDescription() {
return 'Enumerate all links that point to a given namespace';
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'code' => 'params', 'info' => $this->getModuleName() . ' cannot be used as a generator in unique links mode' ),
+ array( 'code' => 'params', 'info' => $this->getModuleName() . ' cannot return corresponding page ids in unique links mode' ),
+ array( 'code' => 'params', 'info' => 'alcontinue and alfrom cannot be used together' ),
+ array( 'code' => 'badcontinue', 'info' => 'Invalid continue parameter' ),
+ ) );
+ }
protected function getExamples() {
return array (
return array_merge( parent::getPossibleErrors(), array(
array( 'invalidtitle', 'title' ),
array( 'missingparam', 'title' ),
+ array( 'code' => 'bad_image_title', 'info' => "The title for {$this->getModuleName()} query must be an image" ),
+ array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
) );
}
public function getDescription() {
return 'List all blocked users and IP addresses.';
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'code' => 'usersandip', 'info' => 'bkusers and bkip cannot be used together' ),
+ array( 'code' => 'cidrtoobroad', 'info' => 'CIDR ranges broader than /16 are not accepted' ),
+ array( 'code' => 'param_user', 'info' => 'User parameter may not be empty' ),
+ array( 'code' => 'param_user', 'info' => 'User name user is not valid' ),
+ ) );
+ }
protected function getExamples() {
return array ( 'api.php?action=query&list=blocks',