MediaWiki
REL1_39
DBQueryError.php
Go to the documentation of this file.
1
<?php
20
namespace
Wikimedia\Rdbms
;
21
27
class
DBQueryError
extends
DBExpectedError
{
29
public
$error
;
31
public
$errno
;
33
public
$sql
;
35
public
$fname
;
36
46
public
function
__construct
(
IDatabase
$db
,
$error
,
$errno
,
$sql
,
$fname
, $message =
null
) {
47
if
( $message ===
null
) {
48
$message =
"Error $errno: $error\n"
.
49
"Function: $fname\n"
.
50
"Query: $sql\n"
;
51
}
52
53
parent::__construct(
$db
, $message, [
'dbName'
=>
$db
->
getServerName
() ] );
54
55
$this->error =
$error
;
56
$this->errno =
$errno
;
57
$this->sql =
$sql
;
58
$this->fname =
$fname
;
59
}
60
}
61
65
class_alias( DBQueryError::class,
'DBQueryError'
);
Wikimedia\Rdbms\DBError\$db
IDatabase null $db
Definition
DBError.php:33
Wikimedia\Rdbms\DBExpectedError
Base class for the more common types of database errors.
Definition
DBExpectedError.php:33
Wikimedia\Rdbms\DBQueryError
Definition
DBQueryError.php:27
Wikimedia\Rdbms\DBQueryError\$errno
int $errno
Definition
DBQueryError.php:31
Wikimedia\Rdbms\DBQueryError\$fname
string $fname
Definition
DBQueryError.php:35
Wikimedia\Rdbms\DBQueryError\$sql
string $sql
Definition
DBQueryError.php:33
Wikimedia\Rdbms\DBQueryError\__construct
__construct(IDatabase $db, $error, $errno, $sql, $fname, $message=null)
Definition
DBQueryError.php:46
Wikimedia\Rdbms\DBQueryError\$error
string $error
Definition
DBQueryError.php:29
Wikimedia\Rdbms\IDatabase
Basic database interface for live and lazy-loaded relation database handles.
Definition
IDatabase.php:39
Wikimedia\Rdbms\IDatabase\getServerName
getServerName()
Get the readable name for the server.
Wikimedia\Rdbms
Definition
ChronologyProtector.php:20
includes
libs
rdbms
exception
DBQueryError.php
Generated on Mon Oct 14 2024 07:23:33 for MediaWiki by
1.10.0