3 namespace MediaWiki\Rest
;
6 * This is the base exception class for non-fatal exceptions thrown from REST
7 * handlers. The exception is not logged, it is merely converted to an
10 class HttpException
extends \Exception
{
12 /** @var array|null */
13 private $errorData = null;
15 public function __construct( $message, $code = 500, $errorData = null ) {
16 parent
::__construct( $message, $code );
17 $this->errorData
= $errorData;
23 public function getErrorData() {
24 return $this->errorData
;