Commit graph

7 commits

Author SHA1 Message Date
Daimona Eaytoy
1d6776fdbc Replace deprecated MWException
Also remove some unchecked exception from doc comments.

Bug: T328220
Bug: T240672
Change-Id: I88b1e948ce5da77d9c4862a2b98793d6ba00cf8b
2024-01-19 21:58:42 +00:00
jenkins-bot
39705eb311 Merge "Replace "@stable for subclassing" with "@stable to extend"" 2020-07-13 09:31:38 +00:00
daniel
3c50afa46b Replace "@stable for subclassing" with "@stable to extend"
For compliance with the new version of the table interface policy
(T255803).

This patch was created by an automated search & replace operation
on the includes/ directory.

Bug: T257789
Change-Id: Ie32c1b11b3d16ddfc0c83a757327d449ff80b2e4
2020-07-13 11:00:30 +02:00
daniel
f7116bb3a2 Replace "@stable for overriding" with "@stable to override"
For compliance with the new version of the table interface policy
(T255803).

This patch was created by an automated search & replace operation
on the includes/ directory.

Bug: T257789
Change-Id: I5ffbb91882ecce2019ab644839eab5e8fb8a1c5f
2020-07-13 10:57:12 +02:00
daniel
474181114d Mark exceptions as newable and stable for subclassing
This marks most remaining exceptions as newable, and some as stable for
subclassing.

Bug: T247862
Change-Id: Idf7c03346a83d4f22c24fb173142c18be0e11d77
2020-07-10 14:11:14 +02:00
Timo Tijhof
11e3172c03 exception: Let MediaWiki.php control final output for ErrorPageError
The same way it does already for non-error output. This makes
it so that doPreOutputCommit() consistently happens between
the staging of output and the actual sending of output.

It is still allowed for code to bypass this, such as for fatal
errors and for handlers that disable OutputPage (like Special:Export).

But for cases where we do want to perform doPreOutputCommit(), it
should be run consistently between staging and sending so that it
can make appropiate decisions based on the current state of
OutputPage.

Previously, the state of OutputPage seen by doPreOutputCommit()
would be the broken/incomplete output of a seemingly succesful
(possibly cacheable) user action, which would then, after
doPreOutputCommit() runs, be completely replaced by $e->report()/
$out->showErrorPage().

This is a prerequisite for being able to reliably send cookie-block
cookies on error pages (next patch).

Bug: T233594
Change-Id: Iaeaf5e55a5868e6be534ddda73f3b56b9d6ef8f0
2019-09-26 07:56:14 +00:00
Timo Tijhof
b706fa4ac1 exception: Create generic BadRequestError based on ErrorPageError
Ideally this would be an option in ErrorPageError (perhaps even the default),
but its constructor isn't very suitable for that.

After this lands, uses of ErrorPageError should be audited to see if it makes
sense to emit a 400 status code.

Change-Id: I4beb6a4f256446b98b66d5e4bcdbab8f247441a8
2016-05-19 18:59:15 +00:00