MWException Class Reference
[Exception]

MediaWiki exception. More...

Inherited by DBError, ErrorPageError, FatalError, FSException, and PasswordError.

List of all members.

Public Member Functions

 useOutputPage ()
 Should the exception use $wgOut to output the error ?
 useMessageCache ()
 Can the extension use wfMsg() to get i18n messages ?
 runHooks ($name, $args=array())
 Run hook to allow extensions to modify the text of the exception.
 msg ($key, $fallback)
 Get a message from i18n.
 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.
 getText ()
 If $wgShowExceptionDetails is true, return a text message with a backtrace to the error.
 getPageTitle ()
 getLogMessage ()
 Return the requested URL and point to file and line number from which the exception occured.
 reportHTML ()
 Output the exception report using HTML.
 report ()
 Output a report about the exception and takes care of formatting.
 htmlHeader ()
 Send headers and output the beginning of the html page if not using $wgOut to output the exception.
 htmlFooter ()
 print the end of the html page if not using $wgOut.
 htmlBodyOnly ()
 headers handled by subclass?

Static Public Member Functions

static isCommandLine ()


Detailed Description

MediaWiki exception.

Definition at line 10 of file Exception.php.


Member Function Documentation

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.

Returns:
String html to output

Reimplemented in DBConnectionError, DBQueryError, and FatalError.

Definition at line 83 of file Exception.php.

References $wgShowExceptionDetails.

Referenced by reportHTML(), and wfThumbMain().

MWException::getLogMessage (  ) 

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

Returns:
string

Reimplemented in DBConnectionError, and DBQueryError.

Definition at line 127 of file Exception.php.

References $file, $url, and $wgRequest.

Referenced by report().

MWException::getPageTitle (  ) 

Reimplemented in DBConnectionError, and DBQueryError.

Definition at line 112 of file Exception.php.

References $wgSitename, useMessageCache(), and wfMsg().

Referenced by htmlHeader(), and reportHTML().

MWException::getText (  ) 

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

Reimplemented in DBConnectionError, DBQueryError, and FatalError.

Definition at line 100 of file Exception.php.

References $wgShowExceptionDetails.

Referenced by PPFuzzTester::execute(), and report().

MWException::htmlBodyOnly (  ) 

headers handled by subclass?

Reimplemented in DBConnectionError.

Definition at line 224 of file Exception.php.

Referenced by reportHTML().

MWException::htmlFooter (  ) 

print the end of the html page if not using $wgOut.

Definition at line 217 of file Exception.php.

Referenced by DBConnectionError::getHTML(), and reportHTML().

MWException::htmlHeader (  ) 

Send headers and output the beginning of the html page if not using $wgOut to output the exception.

Definition at line 194 of file Exception.php.

References $title, $wgLogo, $wgOutputEncoding, $wgSitename, and getPageTitle().

Referenced by DBConnectionError::getHTML(), and reportHTML().

static MWException::isCommandLine (  )  [static]

Definition at line 228 of file Exception.php.

References $GLOBALS.

Referenced by wfReportException().

MWException::msg ( key,
fallback 
)

Get a message from i18n.

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

Definition at line 67 of file Exception.php.

References $args, $fallback, $key, useMessageCache(), wfMsgReal(), and wfMsgReplaceArgs().

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

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 ErrorPageError.

Definition at line 178 of file Exception.php.

References getLogMessage(), getText(), reportHTML(), wfDebugLog(), and wfPrintError().

MWException::reportHTML (  ) 

Output the exception report using HTML.

Definition at line 145 of file Exception.php.

References $wgOut, getHTML(), getPageTitle(), htmlBodyOnly(), htmlFooter(), htmlHeader(), runHooks(), and useOutputPage().

Referenced by report().

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

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

Parameters:
String $name class name of the exception
Array $args arguments to pass to the callback functions
Returns:
mixed string to output or null if any hook has been called

Definition at line 38 of file Exception.php.

References $args, $name, $result, and $wgExceptionHooks.

Referenced by reportHTML().

MWException::useMessageCache (  ) 

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

Returns:
bool

Reimplemented in DBConnectionError.

Definition at line 26 of file Exception.php.

References $wgLang.

Referenced by DBQueryError::getHTML(), getPageTitle(), DBQueryError::getText(), and msg().

MWException::useOutputPage (  ) 

Should the exception use $wgOut to output the error ?

Returns:
bool

Reimplemented in DBConnectionError.

Definition at line 16 of file Exception.php.

References $GLOBALS.

Referenced by reportHTML().


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

Generated on Sat Sep 5 02:08:43 2009 for MediaWiki by  doxygen 1.5.9