MediaWiki
1.30.0
|
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. More... | |
getPageTitle () | |
Return the title of the page when reporting this error in a HTTP response. More... | |
getText () | |
Get the text to display when reporting the error on the command line. More... | |
isLoggable () | |
Whether to log this exception in the exception debug log. More... | |
msg ( $key, $fallback) | |
Get a message from i18n. More... | |
report () | |
Output a report about the exception and takes care of formatting. More... | |
reportHTML () | |
Output the exception report using HTML. More... | |
useMessageCache () | |
Can the extension use the Message class/wfMessage to get i18n-ed messages? More... | |
useOutputPage () | |
Should the exception use $wgOut to output the error? More... | |
Static Public Member Functions | |
static | isCommandLine () |
Check whether we are in command line mode or not to report the exception in the correct format. More... | |
Static Private Member Functions | |
static | header ( $header) |
Send a header, if we haven't already sent them. More... | |
static | statusHeader ( $code) |
MediaWiki exception.
Definition at line 26 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 HttpError, and FatalError.
Definition at line 94 of file MWException.php.
References $type, $wgShowExceptionDetails, class, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), WebRequest\getRequestId(), MWExceptionHandler\getURL(), global, and msg().
Referenced by reportHTML().
MWException::getPageTitle | ( | ) |
Return the title of the page when reporting this error in a HTTP response.
Definition at line 146 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 129 of file MWException.php.
References $wgShowExceptionDetails, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), and global.
Referenced by ChangePassword\execute(), CreateAndPromote\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 220 of file MWException.php.
References $header.
Referenced by HttpError\__construct(), HttpError\getHTML(), HttpError\report(), report(), and reportHTML().
|
static |
Check whether we are in command line mode or not to report the exception in the correct format.
Definition at line 211 of file MWException.php.
References $GLOBALS.
MWException::isLoggable | ( | ) |
Whether to log this exception in the exception debug log.
Reimplemented in HttpError.
Definition at line 45 of file MWException.php.
MWException::msg | ( | $key, | |
$fallback | |||
) |
Get a message from i18n.
string | $key | Message name |
string | $fallback | Default message if the message cache can't be called by the exception The function also has other parameters that are arguments for the message |
Definition at line 75 of file MWException.php.
References $args, $e, $fallback, useMessageCache(), wfMessage(), and wfMsgReplaceArgs().
Referenced by ErrorPageError\__construct(), UploadChunkVerificationException\__construct(), getHTML(), ErrorPageError\getMessageObject(), getPageTitle(), ErrorPageError\report(), UserNotLoggedIn\report(), and reportHTML().
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 LocalFileLockError, UserNotLoggedIn, HttpError, PermissionsError, ErrorPageError, ThrottledError, and BadRequestError.
Definition at line 182 of file MWException.php.
References $wgMimeType, class, getText(), global, header(), reportHTML(), statusHeader(), and wfHttpError().
MWException::reportHTML | ( | ) |
Output the exception report using HTML.
Definition at line 153 of file MWException.php.
References $wgOut, $wgSitename, getHTML(), getPageTitle(), global, header(), msg(), and useOutputPage().
Referenced by report().
|
staticprivate |
Definition at line 225 of file MWException.php.
References $code, and HttpStatus\header().
Referenced by report().
MWException::useMessageCache | ( | ) |
Can the extension use the Message class/wfMessage to get i18n-ed messages?
Definition at line 54 of file MWException.php.
References $wgLang, as, and global.
Referenced by msg(), and useOutputPage().
MWException::useOutputPage | ( | ) |
Should the exception use $wgOut to output the error?
Definition at line 32 of file MWException.php.
References $GLOBALS, and useMessageCache().
Referenced by reportHTML().