From 5c95d4e0ba52ca2a32c100a425c5f35ba8ef9c24 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 16 Feb 2020 12:43:21 -0500 Subject: [PATCH] Additional logging for "Item collection not found" error in toJSON() --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 15cc8cd0ad..e45609098a 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -4506,7 +4506,7 @@ Zotero.Item.prototype.toJSON = function (options = {}) { obj.collections = this.getCollections().map(function (id) { var { libraryID, key } = this.ContainerObjectsClass.getLibraryAndKeyFromID(id); if (!key) { - throw new Error("Item collection " + id + " not found"); + throw new Error("Collection " + id + " not found for item " + this.libraryKey); } return key; }.bind(this));