MediaWiki  master
DBError.php
Go to the documentation of this file.
1 <?php
20 namespace Wikimedia\Rdbms;
21 
22 use RuntimeException;
23 
31 class DBError extends RuntimeException {
33  public $db;
34 
42  public function __construct( ?IDatabase $db, $error, \Throwable $prev = null ) {
43  parent::__construct( $error, 0, $prev );
44  $this->db = $db;
45  }
46 }
47 
51 class_alias( DBError::class, 'DBError' );
Database error base class.
Definition: DBError.php:31
IDatabase null $db
Definition: DBError.php:33
__construct(?IDatabase $db, $error, \Throwable $prev=null)
Construct a database error.
Definition: DBError.php:42
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:40