1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Handle all errors in UnitOfWork commit

This commit is contained in:
Sergey Linnik 2017-08-31 11:38:49 +03:00
parent 5bddb83e57
commit 862a16b18f
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
], ],
"minimum-stability": "dev", "minimum-stability": "dev",
"require": { "require": {
"php": ">=5.4", "php": ">=7.0",
"ext-pdo": "*", "ext-pdo": "*",
"doctrine/collections": "~1.2", "doctrine/collections": "~1.2",
"doctrine/dbal": ">=2.5-dev,<2.6-dev", "doctrine/dbal": ">=2.5-dev,<2.6-dev",

View File

@ -408,7 +408,7 @@ class UnitOfWork implements PropertyChangedListener
} }
$conn->commit(); $conn->commit();
} catch (Exception $e) { } catch (\Throwable $e) {
$this->em->close(); $this->em->close();
$conn->rollback(); $conn->rollback();