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.
This commit is contained in:
Dan Stillman 2015-04-26 19:33:46 -04:00
parent 8c32210507
commit 944d298af7

View file

@ -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