MediaWiki  master
DBConnectionError.php
Go to the documentation of this file.
1 <?php
20 namespace Wikimedia\Rdbms;
21 
32  public function __construct( IDatabase $db = null, $error = 'unknown error' ) {
33  $msg = 'Cannot access the database';
34  if ( trim( $error ) != '' ) {
35  $msg .= ": $error";
36  }
37 
38  parent::__construct( $db, $msg );
39  }
40 }
41 
45 class_alias( DBConnectionError::class, 'DBConnectionError' );
__construct(IDatabase $db=null, $error='unknown error')
IDatabase null $db
Definition: DBError.php:33
Base class for the more common types of database errors.
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:40