MediaWiki REL1_33
DBQueryError.php
Go to the documentation of this file.
1<?php
22namespace Wikimedia\Rdbms;
23
29 public $error;
31 public $errno;
33 public $sql;
35 public $fname;
36
45 public function __construct( IDatabase $db, $error, $errno, $sql, $fname, $message = null ) {
46 if ( $message === null ) {
47 if ( $db instanceof Database && $db->wasConnectionError( $errno ) ) {
48 $message = "A connection error occurred during a query. \n" .
49 "Query: $sql\n" .
50 "Function: $fname\n" .
51 "Error: $errno $error\n";
52 } else {
53 $message = "A database query error has occurred. Did you forget to run " .
54 "your application's database schema updater after upgrading? \n" .
55 "Query: $sql\n" .
56 "Function: $fname\n" .
57 "Error: $errno $error\n";
58 }
59 }
60
61 parent::__construct( $db, $message );
62
63 $this->error = $error;
64 $this->errno = $errno;
65 $this->sql = $sql;
66 $this->fname = $fname;
67 }
68}
69
73class_alias( DBQueryError::class, 'DBQueryError' );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
IDatabase null $db
Definition DBError.php:32
Base class for the more common types of database errors.
__construct(IDatabase $db, $error, $errno, $sql, $fname, $message=null)
Relational database abstraction object.
Definition Database.php:49
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38