MediaWiki master
|
Database error base class. More...
Inherits RuntimeException.
Inherited by Wikimedia\Rdbms\DBExpectedError, and Wikimedia\Rdbms\DBUnexpectedError.
Public Member Functions | |
__construct (?IDatabase $db, $error, \Throwable $prev=null) | |
Construct a database error. | |
Public Attributes | |
IDatabase null | $db |
Database error base class.
Catching and silencing this class or its subclasses is strongly discouraged. Most code should not catch DB errors at all, but let them bubble to the MediaWiki exception handler. If necessary, cleanup can be done in a finally block; catching the exception and then rethrowing it is also acceptable.
Definition at line 36 of file DBError.php.
Wikimedia\Rdbms\DBError::__construct | ( | ?IDatabase | $db, |
$error, | |||
\Throwable | $prev = null ) |
Construct a database error.
IDatabase | null | $db | Object which threw the error |
string | $error | A simple error message to be used for debugging |
\\Throwable | null | $prev | Previous throwable |
Definition at line 47 of file DBError.php.
References Wikimedia\Rdbms\DBError\$db.
IDatabase null Wikimedia\Rdbms\DBError::$db |
Definition at line 38 of file DBError.php.
Referenced by Wikimedia\Rdbms\DBError\__construct(), Wikimedia\Rdbms\DBExpectedError\__construct(), Wikimedia\Rdbms\DBTransactionError\__construct(), Wikimedia\Rdbms\DBQueryTimeoutError\__construct(), Wikimedia\Rdbms\DBQueryDisconnectedError\__construct(), Wikimedia\Rdbms\DBQueryError\__construct(), and Wikimedia\Rdbms\DBConnectionError\__construct().