MediaWiki REL1_35
DBQueryError.php
Go to the documentation of this file.
1<?php
22namespace 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
67class_alias( DBQueryError::class, 'DBQueryError' );
IDatabase null $db
Definition DBError.php:34
Base class for the more common types of database errors.
@newable Stable to extend
__construct(IDatabase $db, $error, $errno, $sql, $fname, $message=null)
Stable to call.
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38