MediaWiki  REL1_19
MWException Class Reference

MediaWiki exception. More...

Inheritance diagram for MWException:

List of all members.

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.
 getLogMessage ()
 Return the requested URL and point to file and line number from which the exception occured.
 getPageTitle ()
 Return titles of this error page.
 getText ()
 If $wgShowExceptionDetails is true, return a text message with a backtrace to the error.
 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 wfMsg() to get i18n messages ?
 useOutputPage ()
 Should the exception use $wgOut to output the error ?

Static Public Member Functions

static isCommandLine ()

Detailed Description

MediaWiki exception.

Definition at line 17 of file Exception.php.


Member Function Documentation

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.

Returns:
String html to output

Reimplemented in FatalError, DBConnectionError, and DBError.

Definition at line 105 of file Exception.php.

References $wgShowExceptionDetails.

Referenced by reportHTML(), and wfStreamThumb().

Here is the caller graph for this function:

Return the requested URL and point to file and line number from which the exception occured.

Returns:
String

Reimplemented in DBQueryError, and DBConnectionError.

Definition at line 150 of file Exception.php.

References $file, and $url.

Referenced by report().

Here is the caller graph for this function:

Return titles of this error page.

Returns:
String

Reimplemented in DBQueryError, and DBConnectionError.

Definition at line 140 of file Exception.php.

References msg().

Referenced by reportHTML().

Here is the call graph for this function:

Here is the caller graph for this function:

If $wgShowExceptionDetails is true, return a text message with a backtrace to the error.

Returns:
string

Reimplemented in FatalError, and DBError.

Definition at line 124 of file Exception.php.

References $wgShowExceptionDetails.

Referenced by DatabaseInstaller\doUpgrade(), CreateAndPromote\execute(), ChangePassword\execute(), PPFuzzTester\execute(), and report().

Here is the caller graph for this function:

static MWException::isCommandLine ( ) [static]
Returns:
bool

Definition at line 217 of file Exception.php.

Referenced by MWExceptionHandler\report().

Here is the caller graph for this function:

MWException::msg ( key,
fallback 
)

Get a message from i18n.

Parameters:
$keyString: message name
$fallbackString: 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
Returns:
String message with arguments replaced

Reimplemented in DBConnectionError.

Definition at line 88 of file Exception.php.

References $fallback, useMessageCache(), wfMsgNoTrans(), and wfMsgReplaceArgs().

Referenced by ErrorPageError\__construct(), getPageTitle(), DBQueryError\getPageTitle(), DBQueryError\getSQL(), and ErrorPageError\report().

Here is the call graph for this function:

Here is the caller graph for this function:

Output a report about the exception and takes care of formatting.

It will be either HTML or plain text based on isCommandLine().

Reimplemented in ThrottledError, PermissionsError, BadTitleError, and ErrorPageError.

Definition at line 199 of file Exception.php.

References getLogMessage(), getText(), MWExceptionHandler\printError(), reportHTML(), and wfDebugLog().

Here is the call graph for this function:

Output the exception report using HTML.

Reimplemented in HttpError, and DBConnectionError.

Definition at line 170 of file Exception.php.

References $wgOut, echo, getHTML(), getPageTitle(), runHooks(), and useOutputPage().

Referenced by report().

Here is the call graph for this function:

Here is the caller graph for this function:

MWException::runHooks ( name,
args = array() 
)

Run hook to allow extensions to modify the text of the exception.

Parameters:
$nameString: class name of the exception
$argsArray: arguments to pass to the callback functions
Returns:
Mixed: string to output or null if any hook has been called

Definition at line 52 of file Exception.php.

References $result, and $wgExceptionHooks.

Referenced by reportHTML().

Here is the caller graph for this function:

Can the extension use wfMsg() to get i18n messages ?

Returns:
bool

Definition at line 33 of file Exception.php.

References $wgLang.

Referenced by DBQueryError\getContentMessage(), msg(), DBConnectionError\msg(), and useOutputPage().

Here is the caller graph for this function:

Should the exception use $wgOut to output the error ?

Returns:
bool

Reimplemented in DBConnectionError.

Definition at line 22 of file Exception.php.

References useMessageCache().

Referenced by reportHTML().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: