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