MediaWiki  master
DBQueryError.php
Go to the documentation of this file.
1 <?php
22 namespace Wikimedia\Rdbms;
23 
31  public $error;
33  public $errno;
35  public $sql;
37  public $fname;
38 
48  public function __construct( IDatabase $db, $error, $errno, $sql, $fname, $message = null ) {
49  if ( $message === null ) {
50  $message = "Error $errno: $error\n" .
51  "Function: $fname\n" .
52  "Query: $sql\n";
53  }
54 
55  parent::__construct( $db, $message );
56 
57  $this->error = $error;
58  $this->errno = $errno;
59  $this->sql = $sql;
60  $this->fname = $fname;
61  }
62 }
63 
67 class_alias( DBQueryError::class, 'DBQueryError' );
Wikimedia\Rdbms\DBError\$db
IDatabase null $db
Definition: DBError.php:34
Wikimedia\Rdbms\DBQueryError\$errno
int $errno
Definition: DBQueryError.php:33
Wikimedia\Rdbms
Definition: ChronologyProtector.php:24
Wikimedia\Rdbms\DBQueryError\$fname
string $fname
Definition: DBQueryError.php:37
Wikimedia\Rdbms\IDatabase
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:38
Wikimedia\Rdbms\DBQueryError
Definition: DBQueryError.php:29
Wikimedia\Rdbms\DBQueryError\$sql
string $sql
Definition: DBQueryError.php:35
Wikimedia\Rdbms\DBQueryError\__construct
__construct(IDatabase $db, $error, $errno, $sql, $fname, $message=null)
Stable to call.
Definition: DBQueryError.php:48
Wikimedia\Rdbms\DBExpectedError
Base class for the more common types of database errors.
Definition: DBExpectedError.php:34
Wikimedia\Rdbms\DBQueryError\$error
string $error
Definition: DBQueryError.php:31