MediaWiki master
ThrottledError.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Exception;
8
17
21 public function __construct() {
22 parent::__construct(
23 'actionthrottled',
24 'actionthrottledtext'
25 );
26 }
27
29 public function report( $action = ErrorPageError::SEND_OUTPUT ) {
30 global $wgOut;
31 $wgOut->setStatusCode( 429 );
32 parent::report( $action );
33 }
34}
35
37class_alias( ThrottledError::class, 'ThrottledError' );
if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
Definition Setup.php:551
An error page which can definitely be safely rendered using the OutputPage.
Show an error when the user hits a rate limit.
report( $action=ErrorPageError::SEND_OUTPUT)
to override