* @param IDatabase $db Object throwing the error
* @param string $error Error text
*/
- function __construct( IDatabase $db = null, $error = 'unknown error' ) {
+ public function __construct( IDatabase $db = null, $error = 'unknown error' ) {
$msg = 'Cannot access the database';
if ( trim( $error ) != '' ) {
$msg .= ": $error";
* @param IDatabase $db Object which threw the error
* @param string $error A simple error message to be used for debugging
*/
- function __construct( IDatabase $db = null, $error ) {
+ public function __construct( IDatabase $db = null, $error ) {
$this->db = $db;
parent::__construct( $error );
}
/** @var string[] Message parameters */
protected $params;
- function __construct( IDatabase $db = null, $error, array $params = [] ) {
+ public function __construct( IDatabase $db = null, $error, array $params = [] ) {
parent::__construct( $db, $error );
$this->params = $params;
}
* @param string $sql
* @param string $fname
*/
- function __construct( IDatabase $db, $error, $errno, $sql, $fname ) {
+ public function __construct( IDatabase $db, $error, $errno, $sql, $fname ) {
if ( $db instanceof Database && $db->wasConnectionError( $errno ) ) {
$message = "A connection error occured. \n" .
"Query: $sql\n" .
* @ingroup Database
*/
class DBTransactionSizeError extends DBTransactionError {
- function getKey() {
+ public function getKey() {
return 'transaction-duration-limit-exceeded';
}
}