diff --git a/source/Spiral/ORM/Transaction.php b/source/Spiral/ORM/Transaction.php index c074df5..64e46e1 100644 --- a/source/Spiral/ORM/Transaction.php +++ b/source/Spiral/ORM/Transaction.php @@ -127,9 +127,13 @@ public function run(bool $forceTransaction = false, bool $clean = true) $executedCommands[] = $command; } } catch (\Throwable $e) { - foreach (array_reverse($wrappedDrivers) as $driver) { - /** @var Driver $driver */ - $driver->rollbackTransaction(); + try { + foreach (array_reverse($wrappedDrivers) as $driver) { + /** @var Driver $driver */ + $driver->rollbackTransaction(); + } + } catch (\Throwable $et) { + throw $e; } foreach (array_reverse($executedCommands) as $command) {