r53702 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53701‎ | r53702 | r53703 >
Date:23:50, 23 July 2009
Author:simetrical
Status:ok
Tags:
Comment:
Better documentation for dieUsage()

If I got it wrong, please improve.
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -721,10 +721,15 @@
722722 }
723723
724724 /**
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'
728732 * @param $httpRespCode int HTTP response code
 733+ * @param $extradata fixme: document this
729734 */
730735 public function dieUsage($description, $errorCode, $httpRespCode = 0, $extradata = null) {
731736 wfProfileClose();

Follow-up revisions

RevisionCommit summaryAuthorDate
r53753Followup to r53702: document $extradata parametercatrope18:29, 25 July 2009

Status & tagging log