wiki.techinc.nl/includes/exception
Timo Tijhof 6d689330c6 rdbms: Move "Did you forget…" from DBQueryError to MWExceptionHandler
This reminder, while useful to see on a web page during local
development or when live upgrading a small wiki, is not so
useful in error logs and production monitoring.

In addition to being general noise and boilerplate to have to
know to ignore (and to know where to look instead), it has the
unfortunate side-effect of letting the 255-char trimmed normalized
messages containing none of the actual errors.

Remove this from the DBQueryError exception message, and place
it instead in the code paths of:

* MWExceptionRenderer::getHTML, used when a fatal error
  happens but we are still able to render it in a skinned
  output page.

  Test Plan:
  - Edit SpecialBlankpage.php#execute, and add the following,
    which involves a non-existant 'pagex' table:

    $db = wfGetDB( DB_REPLICA );
    $db->select( 'pagex', '1', 'foo = 2', __METHOD__ );

  - View Special:Blankpage on your wiki

* MWExceptionRenderer::output (main 'else' branch), used
  when a fatal error is unable to recover and thus render
  a plain text HTML response.

  Test Plan:
  - Edit SpecialBlankpage.php#execute, and add the following,
    which involves an SQL syntax error:

    $db = wfGetDB( DB_REPLICA );
    $db->select( 'page', '1', 'foo =/ 2', __METHOD__ );

  - View Special:Blankpage on your wiki

Bug: T255202
Change-Id: Ie08199ced767486f9e049934a334a1438f266aa6
2020-06-12 18:14:22 +00:00
..
Hook docs: Hook interface doc comment review 2020-04-21 09:10:08 +10:00
BadRequestError.php exception: Let MediaWiki.php control final output for ErrorPageError 2019-09-26 07:56:14 +00:00
BadTitleError.php
CannotCreateActorException.php
ErrorPageError.php Fix more PSR12.Properties.ConstantVisibility.NotFound 2020-05-15 00:33:32 +01:00
FatalError.php Setup: Move wgArticlePath validation to its main consumer (PathRouter) 2019-09-25 23:06:52 +00:00
HttpError.php
ILocalizedException.php Move interface ILocalizedException to own file 2019-02-01 20:05:30 +01:00
LocalizedException.php Clean up redundant Exception|Throwable union type 2020-02-12 20:28:40 +00:00
MWContentSerializationException.php
MWException.php exception: No longer try to send error page post-send on api.php 2020-03-26 17:53:27 +00:00
MWExceptionHandler.php rdbms: Move "Did you forget…" from DBQueryError to MWExceptionHandler 2020-06-12 18:14:22 +00:00
MWExceptionRenderer.php Fix more PSR12.Properties.ConstantVisibility.NotFound 2020-05-15 00:33:32 +01:00
MWUnknownContentModelException.php Set method visibility for various constructors 2019-12-03 20:17:30 +01:00
PermissionsError.php exception: Let MediaWiki.php control final output for ErrorPageError 2019-09-26 07:56:14 +00:00
ProcOpenError.php
ReadOnlyError.php
ShellDisabledError.php
ThrottledError.php exception: Let MediaWiki.php control final output for ErrorPageError 2019-09-26 07:56:14 +00:00
UserBlockedError.php Minor cleanups 2019-11-03 17:10:23 -08:00
UserNotLoggedIn.php Add missing @param and @return to documentation 2019-11-10 22:12:58 +00:00