Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / includes / Rest / HttpException.php
index ae6dde2..bcc414f 100644 (file)
@@ -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;
        }
 }