MediaWiki  1.27.2
DBConnectionError Class Reference
Inheritance diagram for DBConnectionError:
Collaboration diagram for DBConnectionError:

Public Member Functions

 __construct (DatabaseBase $db=null, $error= 'unknown error')
 
 getHTML ()
 
 isLoggable ()
 
 msg ($key, $fallback)
 
 reportHTML ()
 Output the exception report using HTML. More...
 
 searchForm ()
 
 useOutputPage ()
 
- Public Member Functions inherited from DBExpectedError
 getHTML ()
 
 getPageTitle ()
 
 getText ()
 
- Public Member Functions inherited from DBError
 __construct (DatabaseBase $db=null, $error)
 Construct a database error. More...
 
- 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. More...
 
 getPageTitle ()
 Return the title of the page when reporting this error in a HTTP response. More...
 
 getText ()
 Get the text to display when reporting the error on the command line. More...
 
 isLoggable ()
 Whether to log this exception in the exception debug log. More...
 
 msg ($key, $fallback)
 Get a message from i18n. More...
 
 report ()
 Output a report about the exception and takes care of formatting. More...
 
 reportHTML ()
 Output the exception report using HTML. More...
 
 runHooks ($name, $args=[])
 Run hook to allow extensions to modify the text of the exception. More...
 
 useMessageCache ()
 Can the extension use the Message class/wfMessage to get i18n-ed messages? More...
 
 useOutputPage ()
 Should the exception use $wgOut to output the error? More...
 

Public Attributes

string $error
 Error text. More...
 
- Public Attributes inherited from DBError
DatabaseBase $db
 

Protected Member Functions

 getTextContent ()
 
- Protected Member Functions inherited from DBExpectedError
 getHTMLContent ()
 
 getTextContent ()
 

Private Member Functions

 fileCachedPage ()
 

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

Detailed Description

Definition at line 103 of file DatabaseError.php.

Constructor & Destructor Documentation

DBConnectionError::__construct ( DatabaseBase  $db = null,
  $error = 'unknown error' 
)
Parameters
DatabaseBase$dbObject throwing the error
string$errorError text

Definition at line 111 of file DatabaseError.php.

References DBError\$db, and $error.

Member Function Documentation

DBConnectionError::fileCachedPage ( )
private
Returns
string

Definition at line 291 of file DatabaseError.php.

References $context, $t, and RequestContext\getMain().

Referenced by reportHTML().

DBConnectionError::getHTML ( )
Returns
string Safe HTML

Definition at line 160 of file DatabaseError.php.

References $html, Html\element(), global, msg(), searchForm(), and MessageCache\singleton().

DBConnectionError::getTextContent ( )
protected

Definition at line 199 of file DatabaseError.php.

References global.

DBConnectionError::isLoggable ( )
Returns
bool

Definition at line 152 of file DatabaseError.php.

DBConnectionError::msg (   $key,
  $fallback 
)
Parameters
string$key
string$fallbackUnescaped alternative error text in case the message cache cannot be used. Can contain parameters as in regular messages, that should be passed as additional parameters.
Returns
string Unprocessed plain error text with parameters replaced

Definition at line 139 of file DatabaseError.php.

References $args, $fallback, $key, MWException\useMessageCache(), wfMessage(), and wfMsgReplaceArgs().

Referenced by getHTML(), reportHTML(), and searchForm().

DBConnectionError::reportHTML ( )

Output the exception report using HTML.

Returns
void

Definition at line 214 of file DatabaseError.php.

References $cache, $e, $wgUseFileCache, fileCachedPage(), global, and msg().

DBConnectionError::searchForm ( )
Returns
string

Definition at line 248 of file DatabaseError.php.

References $wgCanonicalServer, $wgRequest, $wgSitename, action, form, global, label, msg(), name, style, and type.

Referenced by getHTML().

DBConnectionError::useOutputPage ( )
Returns
bool

Definition at line 127 of file DatabaseError.php.

Member Data Documentation

string DBConnectionError::$error

Error text.

Definition at line 105 of file DatabaseError.php.

Referenced by __construct().


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