[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/db/ -> DatabaseError.php (summary)

This file contains database error classes. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 446 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 classes

DBError:: (1 method):
  __construct()

DBExpectedError:: (4 methods):
  getText()
  getHTML()
  getTextContent()
  getHTMLContent()

DBConnectionError:: (9 methods):
  __construct()
  useOutputPage()
  msg()
  isLoggable()
  getHTML()
  getTextContent()
  reportHTML()
  searchForm()
  fileCachedPage()

DBQueryError:: (6 methods):
  __construct()
  getPageTitle()
  getHTMLContent()
  getTextContent()
  getTechnicalDetails()
  getFallbackMessage()

DBUnexpectedError:: (0 methods):


Class: DBError  - X-Ref

Database error base class

__construct( DatabaseBase $db = null, $error )   X-Ref
Construct a database error

param: DatabaseBase $db Object which threw the error
param: string $error A simple error message to be used for debugging

Class: DBExpectedError  - X-Ref

Base class for the more common types of database errors. These are known to occur
frequently, so we try to give friendly error messages for them.

getText()   X-Ref

return: string

getHTML()   X-Ref

return: string

getTextContent()   X-Ref

return: string

getHTMLContent()   X-Ref

return: string

Class: DBConnectionError  - X-Ref


__construct( DatabaseBase $db = null, $error = 'unknown error' )   X-Ref

param: DatabaseBase $db Object throwing the error
param: string $error Error text

useOutputPage()   X-Ref

return: bool

msg( $key, $fallback )   X-Ref

param: string $key
param: string $fallback Unescaped alternative error text in case the
return: string Unprocessed plain error text with parameters replaced

isLoggable()   X-Ref

return: bool

getHTML()   X-Ref

return: string Safe HTML

getTextContent()   X-Ref
No description

reportHTML()   X-Ref
Output the exception report using HTML.

return: void

searchForm()   X-Ref

return: string

fileCachedPage()   X-Ref

return: string

Class: DBQueryError  - X-Ref


__construct( DatabaseBase $db, $error, $errno, $sql, $fname )   X-Ref

param: DatabaseBase $db
param: string $error
param: int|string $errno
param: string $sql
param: string $fname

getPageTitle()   X-Ref

return: string

getHTMLContent()   X-Ref

return: string

getTextContent()   X-Ref

return: string

getTechnicalDetails()   X-Ref
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.

return: array Keys are message keys; values are arrays of arguments for Html::element().

getFallbackMessage( $key )   X-Ref

param: string $key Message key
return: string English message text

Class: DBUnexpectedError  - X-Ref




Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1