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

Public Member Functions

 __construct (DatabaseBase $db, $error, $errno, $sql, $fname)
 
 getPageTitle ()
 
- 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

 $errno
 
 $error
 
 $fname
 
 $sql
 
- Public Attributes inherited from DBError
DatabaseBase $db
 

Protected Member Functions

 getHTMLContent ()
 
 getTechnicalDetails ()
 Make a list of technical details that can be shown to the user. More...
 
 getTextContent ()
 
- Protected Member Functions inherited from DBExpectedError
 getHTMLContent ()
 
 getTextContent ()
 

Private Member Functions

 getFallbackMessage ($key)
 

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

Constructor & Destructor Documentation

DBQueryError::__construct ( DatabaseBase  $db,
  $error,
  $errno,
  $sql,
  $fname 
)
Parameters
DatabaseBase$db
string$error
int | string$errno
string$sql
string$fname

Definition at line 318 of file DatabaseError.php.

Member Function Documentation

DBQueryError::getFallbackMessage (   $key)
private
Parameters
string$keyMessage key
Returns
string English message text

Definition at line 422 of file DatabaseError.php.

Referenced by getTextContent().

DBQueryError::getHTMLContent ( )
protected
Returns
string

Definition at line 350 of file DatabaseError.php.

DBQueryError::getPageTitle ( )
Returns
string

Definition at line 343 of file DatabaseError.php.

DBQueryError::getTechnicalDetails ( )
protected

Make a list of technical details that can be shown to the user.

This information can aid in debugging yet may be useful to an attacker trying to exploit a security weakness in the software or server configuration.

Thus no such details are shown by default, though if $wgShowHostnames is true, only the full SQL query is hidden; in fact, the error message often does contain a hostname, and sites using this option probably don't care much about "security by obscurity". Of course, if $wgShowSQLErrors is true, the SQL query is shown.

Returns
array Keys are message keys; values are arrays of arguments for Html::element(). Array will be empty if users are not allowed to see any of these details at all.

Definition at line 398 of file DatabaseError.php.

DBQueryError::getTextContent ( )
protected
Returns
string

Definition at line 374 of file DatabaseError.php.

References $key, $s, Html\element(), getFallbackMessage(), and MWException\msg().

Member Data Documentation

DBQueryError::$errno

Definition at line 309 of file DatabaseError.php.

DBQueryError::$error

Definition at line 309 of file DatabaseError.php.

DBQueryError::$fname

Definition at line 309 of file DatabaseError.php.

DBQueryError::$sql

Definition at line 309 of file DatabaseError.php.


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