BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
MWException Class Reference
Inheritance diagram for MWException:
Collaboration diagram for MWException:

Public Member Functions

 useOutputPage ()
 
 isLoggable ()
 
 useMessageCache ()
 
 msg ($key, $fallback)
 
 getHTML ()
 
 getText ()
 
 getPageTitle ()
 
 reportHTML ()
 
 report ()
 
- Public Member Functions inherited from Exception
 __construct ($message="", $code=0, Throwable $previous=null)
 
 getMessage ()
 
 getCode ()
 
 getFile ()
 
 getLine ()
 
 getTrace ()
 
 getPrevious ()
 
 getTraceAsString ()
 
 __toString ()
 

Static Public Member Functions

static isCommandLine ()
 

Additional Inherited Members

- Protected Attributes inherited from Exception
 $message
 
 $code
 
 $file
 
 $line
 

Detailed Description

MediaWiki exception

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
MWException::getPageTitle ( )

Return the title of the page when reporting this error in a HTTP response.

Returns
string
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.

Returns
string
static MWException::isCommandLine ( )
static

Check whether we are in command line mode or not to report the exception in the correct format.

Returns
bool
MWException::isLoggable ( )

Whether to log this exception in the exception debug log.

Since
1.23
Returns
bool
MWException::msg (   $key,
  $fallback 
)

Get a message from i18n

Parameters
string$keyMessage name
string$fallbackDefault 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
MWException::report ( )

Output a report about the exception and takes care of formatting. It will be either HTML or plain text based on isCommandLine().

MWException::reportHTML ( )

Output the exception report using HTML.

MWException::useMessageCache ( )

Can the extension use the Message class/wfMessage to get i18n-ed messages?

Returns
bool
MWException::useOutputPage ( )

Should the exception use $wgOut to output the error?

Returns
bool

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