X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRest%2FHttpException.php;h=bcc414fdf129f286074fca7da4f715972cb8fd8b;hb=1880c8401a0638be07a4fe5139ab425eb725e0ee;hp=ae6dde2b3f4fb7797a6128e619d120c45820817d;hpb=3f0056a252daa4e97396e0eb4b72651f33ce57b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Rest/HttpException.php b/includes/Rest/HttpException.php index ae6dde2b3f..bcc414fdf1 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; } }