aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Rest/HttpException.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Rest/HttpException.php')
-rw-r--r--includes/Rest/HttpException.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/includes/Rest/HttpException.php b/includes/Rest/HttpException.php
index ae6dde2b3f4f..bcc414fdf129 100644
--- a/includes/Rest/HttpException.php
+++ b/includes/Rest/HttpException.php
@@ -8,7 +8,19 @@ namespace MediaWiki\Rest;
* error response.
*/
class HttpException extends \Exception {
- public function __construct( $message, $code = 500 ) {
+
+ /** @var array|null */
+ private $errorData = null;
+
+ public function __construct( $message, $code = 500, $errorData = null ) {
parent::__construct( $message, $code );
+ $this->errorData = $errorData;
+ }
+
+ /**
+ * @return array|null
+ */
+ public function getErrorData() {
+ return $this->errorData;
}
}