MediaWiki  1.23.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
 getText ()
 
- Public Member Functions inherited from MWException
 getLogId ()
 Get a the ID for this error. More...
 
 getLogMessage ()
 Return the requested URL and point to file and line number from which the exception occurred. More...
 
 getPageTitle ()
 Return the title of the page when reporting this error in a HTTP response. More...
 
 report ()
 Output a report about the exception and takes care of formatting. More...
 
 runHooks ( $name, $args=array())
 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...
 

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 ()
 

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 98 of file DatabaseError.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from DBError.

Definition at line 105 of file DatabaseError.php.

References DBError\$db, and $error.

Member Function Documentation

◆ fileCachedPage()

DBConnectionError::fileCachedPage ( )
private
Returns
string

Definition at line 289 of file DatabaseError.php.

References $t, and RequestContext\getMain().

Referenced by reportHTML().

◆ getHTML()

DBConnectionError::getHTML ( )
Returns
string Safe HTML

Reimplemented from DBExpectedError.

Definition at line 158 of file DatabaseError.php.

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

◆ getTextContent()

DBConnectionError::getTextContent ( )
protected
Returns
string

Reimplemented from DBExpectedError.

Definition at line 197 of file DatabaseError.php.

References global.

◆ isLoggable()

DBConnectionError::isLoggable ( )
Returns
boolean

Reimplemented from MWException.

Definition at line 150 of file DatabaseError.php.

◆ msg()

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

Reimplemented from MWException.

Definition at line 133 of file DatabaseError.php.

References $args, $fallback, $wgLang, global, MWException\useMessageCache(), and wfMsgReplaceArgs().

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

◆ reportHTML()

DBConnectionError::reportHTML ( )

Output the exception report using HTML.

Returns
void

Reimplemented from MWException.

Definition at line 212 of file DatabaseError.php.

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

◆ searchForm()

DBConnectionError::searchForm ( )
Returns
string

Definition at line 246 of file DatabaseError.php.

References action, form, global, msg(), name, and type.

Referenced by getHTML().

◆ useOutputPage()

DBConnectionError::useOutputPage ( )
Returns
bool

Reimplemented from MWException.

Definition at line 121 of file DatabaseError.php.

Member Data Documentation

◆ $error

string DBConnectionError::$error

Error text *.

Definition at line 99 of file DatabaseError.php.

Referenced by __construct().


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