commit 944d298af7bb2ef6897f36a5d6005cde6356e198
parent 8c32210507114722ab23583f99ccfd0e34aad2c4
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 26 Apr 2015 19:33:46 -0400
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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