Skip to content

Commit

Permalink
original throw
Browse files Browse the repository at this point in the history
  • Loading branch information
fogelito committed May 15, 2024
1 parent ee93c14 commit 1a85827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Database/Adapter/MariaDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -1645,12 +1645,12 @@ public function deleteDocument(string $collection, string $id): bool
if (!$this->getPDO()->commit()) {
throw new DatabaseException('Failed to commit transaction');
}
} catch (\Throwable $th) {
} catch (\Throwable $e) {
if($this->getPDO()->inTransaction()) {
$this->getPDO()->rollBack();
}

throw new DatabaseException($th->getMessage());
throw $e;
}

return $deleted;
Expand Down

0 comments on commit 1a85827

Please sign in to comment.