Skip to content

Commit

Permalink
add Throwable in Connection::transaction()
Browse files Browse the repository at this point in the history
  • Loading branch information
ziaratban committed Mar 4, 2020
1 parent d1e4da8 commit ada4d4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ public function transaction(callable $actions, $transactionOptions = [], $sessio
if($newClientSession->getTransaction()->getIsActive())
$newClientSession->getTransaction()->rollBack();
throw $e;
} catch (\Throwable $e) {
if($newClientSession->getTransaction()->getIsActive())
$newClientSession->getTransaction()->rollBack();
throw $e;
}
}
}
}

0 comments on commit ada4d4e

Please sign in to comment.