Commit graph

18 commits

Author SHA1 Message Date
Gergő Tisza
fcd495ffef Remove $wgExceptionHooks
Skip deprecation period because it is very unlikely that anyone used this:
it does not appear anywhere on gerrit/git, no nontrivial google hits,
the documentation has been flat out wrong for 9 years and no one
noticed it, and the whole feature is fairly useless as you need to declare
it separately for every single exception class you expect.

Change-Id: I85844a238d3135d05eeba10331149624b04bafe2
2017-05-22 00:57:44 +02:00
jenkins-bot
2ecb96a96f Merge "exception: Add newline at the end of a debugging line for CLI users" 2017-04-26 21:35:33 +00:00
Florian Schmidt
842b7a1769 exception: Add newline at the end of a debugging line for CLI users
Bug: T162315
Change-Id: Ia2963fa298ab0e4782ef823e7f53322cd6a9c99b
2017-04-26 21:26:13 +00:00
jenkins-bot
2d71bf187d Merge "Send 500 http status code, instead of 200, for DBConnectionErrors" 2017-04-22 02:08:09 +00:00
Florian Schmidt
2c1dc398be Send 500 http status code, instead of 200, for DBConnectionErrors
Bug: T160875
Change-Id: I4c909457938a19358dfc4b2aec216b1a148df46c
2017-04-21 11:55:36 +00:00
Aaron Schulz
dd359741cc Move DB errors to Rdbms namespace
Change-Id: I463bd86123501abc68fdb78b4cda6110f7af2549
2017-04-15 10:47:41 -07:00
Huji Lee
0136242734 Always show exceptions of type 'error' in LTR
Bug: T153027
Change-Id: Iad5b9a01f5b8cdaa2ed94b3ece937acc1f6faa60
2016-12-12 20:23:41 -05:00
Aaron Schulz
0a615dd414 Include getPublicLogMessage() in double-exception messages
Change-Id: I364e237f859d65fdcc29025c63c90ac2e0b96718
2016-11-21 22:18:53 -08:00
jenkins-bot
5433c9357d Merge "Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors" 2016-11-21 22:27:38 +00:00
Reedy
57a1e7b270 Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors
Bug: T148957
Change-Id: I8891369156547e8931463a2fd55995cfa9e98ee7
2016-11-21 22:07:03 +00:00
Chad Horohoe
524e624637 Exception renderer: Remove useless check for isCommandLine()
If we're on the cli, we would've never hit this else block

Change-Id: Idff009ab255b1907f752e0c6b5652715923b0ed7
2016-11-21 13:47:09 -08:00
Aaron Schulz
97b5aa9a11 Exception rendering fixes
* Actually use MWExceptionRenderer::AS_RAW. Use this after
  an error is thrown while trying to pretty render the original
  error. This is how this case was originally handled before.
* Do not show the google form or file cache in CLI mode.

Change-Id: I130499753efbf8b4d6d254ea36bacb2473952c1b
2016-09-30 16:57:48 -07:00
Max Semenik
2b51bd1847 Fix function name case
Change-Id: Ibd4f682d2ed8500a50d85aae38f17281646f7c2d
2016-09-26 15:32:54 -07:00
Aaron Schulz
cb9901ef41 Fix "MWExceptionRenderer::getText() should not be called statically" errors
Change-Id: Icfb65795b1455217ca9bc2c1f7cd453144ad5106
2016-09-19 10:55:10 -07:00
Brad Jorsch
0b93d767ea Make MWExceptionRenderer work with PHP7's exception changes
See https://wiki.php.net/rfc/throwable-interface

Change-Id: Ib65f912580f5d84997c5926e7f602d5f5ef3faba
2016-09-19 12:40:36 -04:00
Aaron Schulz
3ad9e41be9 Fix $wgFileCache DB outage fallback
Change-Id: I5c41b4669ca29d119de5c08a2c61dbadae7cf55c
2016-09-16 02:18:12 +00:00
Aaron Schulz
5820c6dcac Exception cleanups for LoadBalancer
* Make the error message itself be dumb/raw.
* Make the exception exposer show the same GUI message.
* Remove overzelous wgLang check in MWExceptionRenderer.

Change-Id: Ifffff3b3cc785ea3080e4975efe33b3c2cf304d6
2016-09-15 01:32:43 +00:00
Aaron Schulz
00bee02971 Add MWExceptionRenderer class and decouple DBError
* This handles the work of showing exceptions so that
  MWException does not have too.
* Simplify the DBError classes to regular Exception
  classes. Lots of pointless prettification has been
  removed, but DBConnectionError still gets the usual
  special treatment of a fallback page and Google form.
* Remove hacky file cache fallback code that probably
  did not work.
* Make MWExceptionHandler::report() wrap
  MWExceptionExposer::output().
* Make MWException::runHooks() wrap
  MWExceptionExposer::runHooks().

Change-Id: I5dfdc84e94ddac65417226cf7c84513ebb9f9faa
2016-09-14 11:53:55 -07:00