MediaWiki master
ThrottledError.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Exception;
22
31
35 public function __construct() {
36 parent::__construct(
37 'actionthrottled',
38 'actionthrottledtext'
39 );
40 }
41
43 public function report( $action = ErrorPageError::SEND_OUTPUT ) {
44 global $wgOut;
45 $wgOut->setStatusCode( 429 );
46 parent::report( $action );
47 }
48}
49
51class_alias( ThrottledError::class, 'ThrottledError' );
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
Definition Setup.php:559
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