MediaWiki
REL1_20
|
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. | |
getLogId () | |
Get a random ID for this error. | |
getLogMessage () | |
Return the requested URL and point to file and line number from which the exception occurred. | |
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. | |
msg ($key, $fallback) | |
Get a message from i18n. | |
report () | |
Output a report about the exception and takes care of formatting. | |
reportHTML () | |
Output the exception report using HTML. | |
runHooks ($name, $args=array()) | |
Run hook to allow extensions to modify the text of the exception. | |
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. | |
Public Attributes | |
$logId |
MediaWiki exception.
Definition at line 32 of file Exception.php.
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, DBConnectionError, and DBError.
Definition at line 125 of file Exception.php.
References getLogId().
Referenced by reportHTML(), and wfStreamThumb().
Get a random ID for this error.
This allows to link the exception to its correspoding log entry when $wgShowExceptionDetails is set to false.
Definition at line 179 of file Exception.php.
References wfRandomString().
Referenced by getHTML(), and getLogMessage().
Return the requested URL and point to file and line number from which the exception occurred.
Reimplemented in DBQueryError, and DBConnectionError.
Definition at line 192 of file Exception.php.
References $file, $url, and getLogId().
Referenced by DeferredUpdates\doUpdates(), and report().
Return the title of the page when reporting this error in a HTTP response.
Reimplemented in DBQueryError, and DBConnectionError.
Definition at line 168 of file Exception.php.
References msg().
Referenced by reportHTML().
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, and DBError.
Definition at line 151 of file Exception.php.
Referenced by ChangePassword\execute(), CreateAndPromote\execute(), PPFuzzTester\execute(), and report().
static MWException::isCommandLine | ( | ) | [static] |
Check whether we are in command line mode or not to report the exception in the correct format.
Definition at line 282 of file Exception.php.
Referenced by MWExceptionHandler\report().
MWException::msg | ( | $ | key, |
$ | fallback | ||
) |
Get a message from i18n.
$key | string: message name |
$fallback | string: 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 |
Reimplemented in DBConnectionError.
Definition at line 108 of file Exception.php.
References $fallback, useMessageCache(), wfMessage(), and wfMsgReplaceArgs().
Referenced by ErrorPageError\__construct(), getPageTitle(), and ErrorPageError\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, ThrottledError, PermissionsError, BadTitleError, and ErrorPageError.
Definition at line 250 of file Exception.php.
References getLogMessage(), getText(), MWExceptionHandler\printError(), reportHTML(), wfDebugLog(), and wfHttpError().
Output the exception report using HTML.
Reimplemented in DBConnectionError.
Definition at line 215 of file Exception.php.
References $wgOut, echo, getHTML(), getPageTitle(), runHooks(), and useOutputPage().
Referenced by report().
MWException::runHooks | ( | $ | name, |
$ | args = array() |
||
) |
Run hook to allow extensions to modify the text of the exception.
$name | string: class name of the exception |
$args | array: arguments to pass to the callback functions |
Definition at line 71 of file Exception.php.
References $result.
Referenced by reportHTML().
Can the extension use the Message class/wfMessage to get i18n-ed messages?
Definition at line 52 of file Exception.php.
References $wgLang.
Referenced by msg(), and useOutputPage().
Should the exception use $wgOut to output the error?
Reimplemented in DBConnectionError.
Definition at line 40 of file Exception.php.
References useMessageCache().
Referenced by reportHTML().
MWException::$logId |
Definition at line 33 of file Exception.php.