[Tim Starling wrote] :
For unexpected code branches which appear to be unreachable through ordinary user action, the previous code exited with a backtrace; I replaced these with an exception throw to produce similar behaviour.
For the benefit of extensions and other unmigrated code, the old interfaces such as OutputPage::errorpage() and wfDebugDieBacktrace()
Can I please ask what the new Exceptions looks like in the HTML output? How will I know one if I see one?
I'm familiar with the format of the old wfDebugDieBacktrace output, which looked like this:
========================================== Something went wrong.
Backtrace:
* GlobalFunctions.php line 659 calls wfBacktrace() * DoStuff.php line 8121 calls wfDebugDieBacktrace() * Linker.php line 141 calls Linker::DoStuff() * Linker.php line 1594 calls Linker::Bar() * Parser.php line 140 calls Linker::Bar() * Parser.php line 1511 calls Parser::Foo() * Parser.php line 849 calls Parser::replaceInternalLinks() * Parser.php line 240 calls Parser::internalParse() * EditPage.php line 1312 calls Parser::parse() * EditPage.php line 1163 calls EditPage::getPreviewText() * EditPage.php line 923 calls EditPage::showPreview() * EditPage.php line 308 calls EditPage::showEditForm() * EditPage.php line 148 calls EditPage::edit() * Wiki.php line 380 calls EditPage::submit() * Wiki.php line 50 calls MediaWiki::performAction() * index.php line 136 calls MediaWiki::initialize() * index.php line 3 calls require() ==========================================
Just wondering what the new Exceptions look like, so that I can grep for them for when testing.
Previously I would grep for the string "wfDebugDieBacktrace", and if that occurred in the output, it was a pretty good bet that something went wrong; Could I for example now grep the output for the string "Exception"?
All the best, Nick.