MediaWiki REL1_39
DBTransactionError.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
22use Wikimedia\NormalizedException\INormalizedException;
23use Wikimedia\NormalizedException\NormalizedExceptionTrait;
24
30class DBTransactionError extends DBExpectedError implements INormalizedException {
31
32 use NormalizedExceptionTrait;
33
42 public function __construct(
43 ?IDatabase $db, $error, array $params = [], \Throwable $prev = null, $errorParams = []
44 ) {
45 $this->normalizedMessage = $error;
46 $this->messageContext = $errorParams;
47 parent::__construct(
48 $db,
49 self::getMessageFromNormalizedMessage( $error, $params ),
50 $params,
51 $prev
52 );
53 }
54}
55
59class_alias( DBTransactionError::class, 'DBTransactionError' );
IDatabase null $db
Definition DBError.php:33
Base class for the more common types of database errors.
string[] $params
Message parameters.
__construct(?IDatabase $db, $error, array $params=[], \Throwable $prev=null, $errorParams=[])
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:39