Manual:MWException.php
Appearance
From mediawiki.org
| MediaWiki file: MWException.php | |
|---|---|
| Location: | includes/exception/ (includes/Exception/ in 1.46 or later) |
| Source code: | master • 1.44.2 • 1.43.5 • 1.39.15 |
| Classes: | MWException |
Extensible class for throwing exceptions.
Public methods
[edit ]- isLoggable() - whether to log this exception in the exception debug log.
- useMessageCache() - whether the extension uses the Message class/wfMessage to get i18n-ed messages.
- msg() - get a message from i18n.
- getPageTitle() - return the title of the page when reporting this error in a HTTP response.
- reportHTML() - output the exception report using HTML.
- report() - output a report about the exception and takes care of formatting. It will be either HTML or plain text based on isCommandLine().
- isCommandLine() - check whether we are in command line mode or not to report the exception in the correct format.
- Not recommended for third-party use:
- getHTML() - use MWExceptionRenderer::getHTML instead.
- getText() - ue MWExceptionRenderer::getText instead.