From 7816ef83c930d7a6abcb41e592991ae7870f8ae2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 25 Jan 2010 20:33:46 +0000 Subject: [PATCH] More helpful error message pulling sync data with an unknown item type --- chrome/content/zotero/xpcom/sync.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index dfaa94951..72950f77e 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -3474,6 +3474,12 @@ Zotero.Sync.Server.Data = new function() { data.dateModified = xmlItem.@dateModified.toString(); } data.itemTypeID = Zotero.ItemTypes.getID(xmlItem.@itemType.toString()); + // TEMP - NSF + if (!data.itemTypeID) { + var msg = "Invalid item type '" + xmlItem.@itemType.toString() + "' in Zotero.Sync.Server.Data.xmlToItem()"; + var e = new Zotero.Error(msg, "INVALID_ITEM_TYPE"); + throw (e); + } var changedFields = {};