aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiUsageException.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiUsageException.php')
-rw-r--r--includes/api/ApiUsageException.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/api/ApiUsageException.php b/includes/api/ApiUsageException.php
index 7e21ab5ba446..9dc1f92bbc7d 100644
--- a/includes/api/ApiUsageException.php
+++ b/includes/api/ApiUsageException.php
@@ -95,7 +95,7 @@ class UsageException extends MWException {
* starts throwing ApiUsageException. Eventually UsageException will go away
* and this will (probably) extend MWException directly.
*/
-class ApiUsageException extends UsageException {
+class ApiUsageException extends UsageException implements ILocalizedException {
protected $modulePath;
protected $status;
@@ -202,6 +202,13 @@ class ApiUsageException extends UsageException {
}
/**
+ * @inheritdoc
+ */
+ public function getMessageObject() {
+ return $this->status->getMessage();
+ }
+
+ /**
* @return string
*/
public function __toString() {