summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index e157fc4..f617059 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -549,7 +549,15 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
'', __LINE__, __FILE__, $sql, $this->db
);
}
- $this->db->sql_transaction('commit');
+
+ if (!$this->db->sql_transaction('commit')) {
+ $this->db->sql_transaction('rollback');
+ message_die(
+ GENERAL_ERROR,
+ 'Could not commit bookmark',
+ '', __LINE__, __FILE__, $sql, $this->db
+ );
+ }
// Everything worked out, so return the new bookmark's bId.
return $bId;