MediaWiki REL1_37
MediaWiki\Rest\HttpException Class Reference

This is the base exception class for non-fatal exceptions thrown from REST handlers. More...

Inheritance diagram for MediaWiki\Rest\HttpException:
Collaboration diagram for MediaWiki\Rest\HttpException:

Public Member Functions

 __construct ( $message, $code=500, $errorData=null)
 
 getErrorData ()
 

Private Attributes

array null $errorData
 

Detailed Description

This is the base exception class for non-fatal exceptions thrown from REST handlers.

The exception is not logged, it is merely converted to an error response.

@newable

Definition at line 12 of file HttpException.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\HttpException::__construct (   $message,
  $code = 500,
  $errorData = null 
)
Stability: stable
to call
Parameters
string$message
int$code
array | null$errorData

Definition at line 24 of file HttpException.php.

References MediaWiki\Rest\HttpException\$errorData.

Member Function Documentation

◆ getErrorData()

MediaWiki\Rest\HttpException::getErrorData ( )
Returns
array|null

Definition at line 32 of file HttpException.php.

References MediaWiki\Rest\HttpException\$errorData.

Member Data Documentation

◆ $errorData

array null MediaWiki\Rest\HttpException::$errorData
private

The documentation for this class was generated from the following file: