X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fexception%2FDBError.php;h=aad219dd292fe6d3ab3242d53b1e479e62103e24;hp=2f7499bc6443a3c1c50f528860b8642c5c229acd;hb=3975e04cf4d14d92bdb95d144f7258205df4efb5;hpb=237d3271fd313ebe09858a5c442a91216a7b61cf diff --git a/includes/libs/rdbms/exception/DBError.php b/includes/libs/rdbms/exception/DBError.php index 2f7499bc64..aad219dd29 100644 --- a/includes/libs/rdbms/exception/DBError.php +++ b/includes/libs/rdbms/exception/DBError.php @@ -21,13 +21,13 @@ namespace Wikimedia\Rdbms; -use Exception; +use RuntimeException; /** * Database error base class * @ingroup Database */ -class DBError extends Exception { +class DBError extends RuntimeException { /** @var IDatabase|null */ public $db; @@ -35,10 +35,11 @@ class DBError extends Exception { * Construct a database error * @param IDatabase $db Object which threw the error * @param string $error A simple error message to be used for debugging + * @param \Exception|\Throwable|null $prev Previous exception */ - public function __construct( IDatabase $db = null, $error ) { + public function __construct( IDatabase $db = null, $error, $prev = null ) { + parent::__construct( $error, 0, $prev ); $this->db = $db; - parent::__construct( $error ); } }