Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit f7a6f0a

Browse files
authored
Update Transaction.php
1 parent 59fb4c2 commit f7a6f0a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

source/Spiral/ORM/Transaction.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ public function run(bool $forceTransaction = false, bool $clean = true)
127127
$executedCommands[] = $command;
128128
}
129129
} catch (\Throwable $e) {
130-
foreach (array_reverse($wrappedDrivers) as $driver) {
131-
/** @var Driver $driver */
132-
$driver->rollbackTransaction();
130+
try {
131+
foreach (array_reverse($wrappedDrivers) as $driver) {
132+
/** @var Driver $driver */
133+
$driver->rollbackTransaction();
134+
}
135+
} catch (\Throwable $et) {
136+
throw $e;
133137
}
134138

135139
foreach (array_reverse($executedCommands) as $command) {

0 commit comments

Comments
 (0)