Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -721,10 +721,15 @@ |
722 | 722 | } |
723 | 723 | |
724 | 724 | /** |
725 | | - * Call the main module's error handler |
726 | | - * @param $description string Error text |
727 | | - * @param $errorCode string Error code |
| 725 | + * Throw a UsageException, which will (if uncaught) call the main module's |
| 726 | + * error handler and die with an error message. |
| 727 | + * |
| 728 | + * @param $description string One-line human-readable description of the |
| 729 | + * error condition, e.g., "The API requires a valid action parameter" |
| 730 | + * @param $errorCode string Brief, arbitrary, stable string to allow easy |
| 731 | + * automated identification of the error, e.g., 'unknown_action' |
728 | 732 | * @param $httpRespCode int HTTP response code |
| 733 | + * @param $extradata fixme: document this |
729 | 734 | */ |
730 | 735 | public function dieUsage($description, $errorCode, $httpRespCode = 0, $extradata = null) { |
731 | 736 | wfProfileClose(); |