From 944d298af7bb2ef6897f36a5d6005cde6356e198 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 26 Apr 2015 19:33:46 -0400 Subject: [PATCH] Make retrieving transactionDate with no transaction fatal I think the places where we retrieve it are always within transactions, and this helps catch promises that aren't waited for. --- chrome/content/zotero/xpcom/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 27c65cb6d3..34d9e0db2a 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -48,7 +48,7 @@ Zotero.DBConnection = function(dbName) { return this._transactionDate; } - Zotero.debug("Zotero.DB.transactionDate retrieved with no transaction", 2); + throw new Error("Transaction not in progress"); // Use second granularity rather than millisecond // for comparison purposes