diff --git a/src/QueryReflection/PdoMysqlQueryReflector.php b/src/QueryReflection/PdoMysqlQueryReflector.php index 6685db0f9..12547a4f6 100644 --- a/src/QueryReflection/PdoMysqlQueryReflector.php +++ b/src/QueryReflection/PdoMysqlQueryReflector.php @@ -49,6 +49,7 @@ protected function simulateQuery(string $queryString) $this->pdo->beginTransaction(); } catch (PDOException $e) { // not all drivers may support transactions + throw new \RuntimeException('Failed to start transaction', $e->getCode(), $e); } try { @@ -60,6 +61,7 @@ protected function simulateQuery(string $queryString) $this->pdo->rollBack(); } catch (PDOException $e) { // not all drivers may support transactions + throw new \RuntimeException('Failed to rollback transaction', $e->getCode(), $e); } } diff --git a/src/QueryReflection/PdoPgSqlQueryReflector.php b/src/QueryReflection/PdoPgSqlQueryReflector.php index f336974d2..5e00069a5 100644 --- a/src/QueryReflection/PdoPgSqlQueryReflector.php +++ b/src/QueryReflection/PdoPgSqlQueryReflector.php @@ -45,6 +45,7 @@ protected function simulateQuery(string $queryString) $this->pdo->beginTransaction(); } catch (PDOException $e) { // not all drivers may support transactions + throw new \RuntimeException('Failed to start transaction', $e->getCode(), $e); } try { @@ -56,6 +57,7 @@ protected function simulateQuery(string $queryString) $this->pdo->rollBack(); } catch (PDOException $e) { // not all drivers may support transactions + throw new \RuntimeException('Failed to rollback transaction', $e->getCode(), $e); } }