MediaWiki  master
HttpException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Rest;
4 
12 class HttpException extends \Exception {
13 
15  private $errorData;
16 
24  public function __construct( $message, $code = 500, $errorData = null ) {
25  parent::__construct( $message, $code );
26  $this->errorData = $errorData;
27  }
28 
32  public function getErrorData() {
33  return $this->errorData;
34  }
35 }
This is the base exception class for non-fatal exceptions thrown from REST handlers.
__construct( $message, $code=500, $errorData=null)