MediaWiki master
MediaWiki\Rest\HttpException Class Reference

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

Inherits Exception.

Inherited by MediaWiki\Rest\LocalizedHttpException, MediaWiki\Rest\RedirectException, and MediaWiki\Rest\ResponseException.

Collaboration diagram for MediaWiki\Rest\HttpException:

Public Member Functions

 __construct ( $message, $code=500, $errorData=[])
 
 getErrorData ()
 

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.

Stability: newable

Definition at line 12 of file HttpException.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 24 of file HttpException.php.

Member Function Documentation

◆ getErrorData()

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

Definition at line 32 of file HttpException.php.


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