MediaWiki
REL1_22
|
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 the 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. | |
isLoggable () | |
Whether to log this exception in the exception debug log. | |
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. |
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 HttpError, FatalError, DBConnectionError, and DBError.
Definition at line 134 of file Exception.php.
References getLogId(), MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), and global.
Referenced by reportHTML(), and wfStreamThumb().
Get a the ID for this error.
Definition at line 187 of file Exception.php.
References wfDeprecated().
Referenced by getHTML().
Return the requested URL and point to file and line number from which the exception occurred.
Definition at line 200 of file Exception.php.
References wfDeprecated().
Referenced by getText().
Return the title of the page when reporting this error in a HTTP response.
Reimplemented in DBQueryError, and DBConnectionError.
Definition at line 176 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 159 of file Exception.php.
References getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), and global.
Referenced by ChangePassword\execute(), CreateAndPromote\execute(), PPFuzzTester\execute(), report(), PublishStashedFileJob\run(), and AssembleUploadChunksJob\run().
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 269 of file Exception.php.
References empty.
Referenced by MWExceptionHandler\report().
Whether to log this exception in the exception debug log.
Reimplemented in DBQueryError, and DBConnectionError.
Definition at line 52 of file Exception.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 |
Reimplemented in DBConnectionError.
Definition at line 117 of file Exception.php.
References $fallback, $key, 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 243 of file Exception.php.
References getText(), global, MWExceptionHandler\logException(), MWExceptionHandler\printError(), reportHTML(), and wfHttpError().
Referenced by RunJobs\execute().
Output the exception report using HTML.
Reimplemented in DBConnectionError.
Definition at line 208 of file Exception.php.
References $wgOut, getHTML(), getPageTitle(), global, runHooks(), and useOutputPage().
Referenced by report().
MWException::runHooks | ( | $ | name, |
$ | args = array() |
||
) |
Run hook to allow extensions to modify the text of the exception.
string | $name | class name of the exception |
array | $args | arguments to pass to the callback functions |
Definition at line 80 of file Exception.php.
References $name, $result, array(), as, and global.
Referenced by reportHTML().
Can the extension use the Message class/wfMessage to get i18n-ed messages?
Definition at line 61 of file Exception.php.
References $wgLang, as, and global.
Referenced by msg(), and useOutputPage().
Should the exception use $wgOut to output the error?
Reimplemented in DBConnectionError.
Definition at line 39 of file Exception.php.
References empty, and useMessageCache().
Referenced by reportHTML().