MediaWiki REL1_35
|
Base class for the more common types of database errors. More...
Public Member Functions | |
__construct (?IDatabase $db, $error, array $params=[], \Throwable $prev=null) | |
Stable to call. | |
getKey () | |
Returns the message key. | |
getParams () | |
Returns the message parameters. | |
Public Member Functions inherited from Wikimedia\Rdbms\DBError | |
__construct (?IDatabase $db, $error, \Throwable $prev=null) | |
Construct a database error Stable to call. | |
Protected Attributes | |
string[] | $params |
Message parameters. | |
Additional Inherited Members | |
Public Attributes inherited from Wikimedia\Rdbms\DBError | |
IDatabase null | $db |
Base class for the more common types of database errors.
These are known to occur frequently, so we try to give friendly error messages for them.
@newable Stable to extend
Definition at line 34 of file DBExpectedError.php.
Wikimedia\Rdbms\DBExpectedError::__construct | ( | ?IDatabase | $db, |
$error, | |||
array | $params = [] , |
||
\Throwable | $prev = null |
||
) |
Stable to call.
IDatabase | null | $db | |
string | $error | |
array | $params | |
\\Throwable | null | $prev |
Definition at line 45 of file DBExpectedError.php.
References Wikimedia\Rdbms\DBError\$db, and Wikimedia\Rdbms\DBExpectedError\$params.
Wikimedia\Rdbms\DBExpectedError::getKey | ( | ) |
Returns the message key.
If a list of multiple possible keys was supplied to the constructor, this method may return any of these keys. After the message has been fetched, this method will return the key that was actually used to fetch the message.
Implements MessageSpecifier.
Reimplemented in Wikimedia\Rdbms\DBTransactionSizeError.
Definition at line 52 of file DBExpectedError.php.
Wikimedia\Rdbms\DBExpectedError::getParams | ( | ) |
Returns the message parameters.
Implements MessageSpecifier.
Definition at line 56 of file DBExpectedError.php.
References Wikimedia\Rdbms\DBExpectedError\$params.
|
protected |
Message parameters.
Definition at line 36 of file DBExpectedError.php.
Referenced by Wikimedia\Rdbms\DBExpectedError\__construct(), and Wikimedia\Rdbms\DBExpectedError\getParams().