MediaWiki REL1_34
ScribuntoException Class Reference

An exception class which represents an error in the script. More...

Inheritance diagram for ScribuntoException:
Collaboration diagram for ScribuntoException:

Public Member Functions

 __construct ( $messageName, $params=[])
 
 getMessageName ()
 
 getScriptTraceHtml ( $options=[])
 Get the backtrace as HTML, or false if there is none available.
 
 toStatus ()
 
- Public Member Functions inherited from 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.
 
 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,... $params)
 Get a message from i18n.
 
 report ()
 Output a report about the exception and takes care of formatting.
 
 reportHTML ()
 Output the exception report using HTML.
 
 useMessageCache ()
 Can the extension use the Message class/wfMessage to get i18n-ed messages?
 
 useOutputPage ()
 Should the exception use $wgOut to output the error?
 

Public Attributes

array $messageArgs
 
string $messageName
 
array $params
 

Additional Inherited Members

- Static Public Member Functions inherited from MWException
static isCommandLine ()
 Check whether we are in command line mode or not to report the exception in the correct format.
 

Detailed Description

An exception class which represents an error in the script.

This does not normally abort the request, instead it is caught and shown to the user.

Definition at line 136 of file Common.php.

Constructor & Destructor Documentation

◆ __construct()

ScribuntoException::__construct ( $messageName,
$params = [] )
Parameters
string$messageName
array$params

Definition at line 156 of file Common.php.

References $messageName, $params, and wfMessage().

Member Function Documentation

◆ getMessageName()

ScribuntoException::getMessageName ( )

◆ getScriptTraceHtml()

ScribuntoException::getScriptTraceHtml ( $options = [])

Get the backtrace as HTML, or false if there is none available.

Parameters
array$options
Returns
bool|string

Reimplemented in Scribunto_LuaError.

Definition at line 206 of file Common.php.

Referenced by ScribuntoHooks\invokeHook(), ApiScribuntoConsole\runConsole(), and Scribunto_LuaCommonTest\testNonUtf8Errors().

◆ toStatus()

ScribuntoException::toStatus ( )

Definition at line 195 of file Common.php.

Referenced by Scribunto_LuaModule\validate().

Member Data Documentation

◆ $messageArgs

array ScribuntoException::$messageArgs

Definition at line 145 of file Common.php.

◆ $messageName

string ScribuntoException::$messageName

Definition at line 140 of file Common.php.

Referenced by __construct(), and getMessageName().

◆ $params

array ScribuntoException::$params

Definition at line 150 of file Common.php.

Referenced by __construct().


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