rdbms: make Database query error handling more strict
[lhc/web/wiklou.git] / includes / libs / rdbms / exception / DBError.php
index 5023800..aad219d 100644 (file)
@@ -35,10 +35,11 @@ class DBError extends RuntimeException {
         * 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 );
        }
 }