From 99ffa76e6ff9fdfd1a8d2c28fd0976c7ef22df56 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 31 May 2009 20:19:49 +0000 Subject: [PATCH] Better error message for a sync error (not yet fixed) --- chrome/content/zotero/xpcom/sync.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index c974374d42..b73fe49467 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -3144,6 +3144,10 @@ Zotero.Sync.Server.Data = new function() { var childItemIDs = []; for each(var key in childItems) { var childItem = Zotero.Items.getByLibraryAndKey(collection.libraryID, key); + if (!childItem) { + throw ("Missing child item " + key + " for collection " + collection.libraryID + "/" + collection.key + + " in Zotero.Sync.Server.Data.xmlToCollection()"); + } childItemIDs.push(childItem.id); } collection.childItems = childItemIDs;