diff --git a/src/Db.php b/src/Db.php index 2a12775..7181dd7 100644 --- a/src/Db.php +++ b/src/Db.php @@ -359,7 +359,7 @@ public function search(string $row, string $value, ?array $hidden = []): ?array /** * Begin a database transaction - * + * * @return self */ public function beginTransaction(): self @@ -372,7 +372,7 @@ public function beginTransaction(): self /** * Commit the current transaction - * + * * @return self */ public function commit(): self @@ -385,7 +385,7 @@ public function commit(): self /** * Rollback the current transaction - * + * * @return self */ public function rollback(): self @@ -398,7 +398,7 @@ public function rollback(): self /** * Transaction shorthand - * + * * @param callable $callback The callback to run * @return self */ @@ -410,6 +410,7 @@ public function transaction($callback): self $this->commit(); } catch (\Exception $e) { $this->rollback(); + throw $e; }