From 3666da5b22912e0e0cb7747c5984358515d3217e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 11 Sep 2019 00:13:23 -0400 Subject: [PATCH] Additional debugging for file sync error "attachmentSyncedModificationTime must be a number" --- chrome/content/zotero/xpcom/data/item.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index c22ef38b7f..89ed91ff4f 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2995,7 +2995,7 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentSyncedModificationTime', }, set: function (val) { if (!this.isAttachment()) { - throw ("attachmentSyncedModificationTime can only be set for attachment items"); + throw new Error("attachmentSyncedModificationTime can only be set for attachment items"); } switch (this.attachmentLinkMode) { @@ -3008,9 +3008,11 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentSyncedModificationTime', } if (typeof val != 'number') { + Zotero.debug(val, 2); throw new Error("attachmentSyncedModificationTime must be a number"); } if (parseInt(val) != val || val < 0) { + Zotero.debug(val, 2); throw new Error("attachmentSyncedModificationTime must be a timestamp in milliseconds"); } if (val < 10000000000) {