MediaWiki REL1_37
|
Public Member Functions | |
getHTML () | |
If $wgShowExceptionDetails is true, return a HTML message with a backtrace to the error, otherwise show a message to ask to set it to true to show that information. | |
getPageTitle () | |
Return the title of the page when reporting this error in a HTTP response. | |
getText () | |
Get the text to display when reporting the error on the command line. | |
isLoggable () | |
Whether to log this exception in the exception debug log. | |
msg ( $key, $fallback,... $params) | |
Get a message from i18n. | |
report () | |
Output a report about the exception and takes care of formatting. | |
reportHTML () | |
Output the exception report using HTML. | |
useMessageCache () | |
Can the extension use the Message class/wfMessage to get i18n-ed messages? | |
useOutputPage () | |
Should the exception use $wgOut to output the error? | |
Static Public Member Functions | |
static | isCommandLine () |
Check whether we are in command line mode or not to report the exception in the correct format. | |
Private Member Functions | |
writeToCommandLine ( $message) | |
Write a message to stderr falling back to stdout if stderr unavailable. | |
Static Private Member Functions | |
static | header ( $header) |
Send a header, if we haven't already sent them. | |
static | statusHeader ( $code) |
MediaWiki exception.
@newable
Definition at line 29 of file MWException.php.
MWException::getHTML | ( | ) |
If $wgShowExceptionDetails is true, return a HTML message with a backtrace to the error, otherwise show a message to ask to set it to true to show that information.
Reimplemented in FatalError, and HttpError.
Definition at line 112 of file MWException.php.
References $type, $wgShowExceptionDetails, and msg().
Referenced by reportHTML(), and wfStreamThumb().
MWException::getPageTitle | ( | ) |
Return the title of the page when reporting this error in a HTTP response.
Definition at line 168 of file MWException.php.
References msg().
Referenced by reportHTML().
MWException::getText | ( | ) |
Get the text to display when reporting the error on the command line.
If $wgShowExceptionDetails is true, return a text message with a backtrace to the error.
Reimplemented in FatalError.
Definition at line 149 of file MWException.php.
References $wgShowExceptionDetails.
Referenced by DatabaseInstaller\doUpgrade(), CreateAndPromote\execute(), PPFuzzTester\execute(), and report().
|
staticprivate |
Send a header, if we haven't already sent them.
We shouldn't, but sometimes we might in a weird case like Export
string | $header |
Definition at line 265 of file MWException.php.
References $header, and header().
Referenced by HttpError\__construct(), HttpError\getHTML(), header(), and HttpError\report().
|
static |
Check whether we are in command line mode or not to report the exception in the correct format.
Definition at line 256 of file MWException.php.
MWException::isLoggable | ( | ) |
Whether to log this exception in the exception debug log.
Reimplemented in HttpError.
Definition at line 52 of file MWException.php.
MWException::msg | ( | $key, | |
$fallback, | |||
$params | |||
) |
Get a message from i18n.
string | $key | Message name |
string | $fallback | Default message if the message cache can't be called by the exception |
mixed | ...$params To pass to wfMessage() |
Definition at line 81 of file MWException.php.
References $fallback, $res, $wgSitename, useMessageCache(), wfMessage(), and wfMsgReplaceArgs().
Referenced by ErrorPageError\__construct(), UploadChunkVerificationException\__construct(), UploadFromChunks\addChunk(), getHTML(), ErrorPageError\getMessageObject(), getPageTitle(), ErrorPageError\report(), UserNotLoggedIn\report(), reportHTML(), and UploadFromChunks\tryStashFile().
MWException::report | ( | ) |
Output a report about the exception and takes care of formatting.
It will be either HTML or plain text based on isCommandLine().
Reimplemented in HttpError.
Definition at line 217 of file MWException.php.
References $wgMimeType, getText(), reportHTML(), and writeToCommandLine().
MWException::reportHTML | ( | ) |
Output the exception report using HTML.
Definition at line 176 of file MWException.php.
References $wgOut, $wgSitename, getHTML(), getPageTitle(), msg(), and useOutputPage().
Referenced by report().
|
staticprivate |
Definition at line 271 of file MWException.php.
MWException::useMessageCache | ( | ) |
Can the extension use the Message class/wfMessage to get i18n-ed messages?
Definition at line 63 of file MWException.php.
Referenced by msg(), and useOutputPage().
MWException::useOutputPage | ( | ) |
Should the exception use $wgOut to output the error?
Definition at line 35 of file MWException.php.
References useMessageCache().
Referenced by reportHTML().
|
private |
Write a message to stderr falling back to stdout if stderr unavailable.
string | $message |
Definition at line 241 of file MWException.php.
Referenced by report().