www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7816ef83c930d7a6abcb41e592991ae7870f8ae2
parent fd78461fc66fb5fddb012b899645b2ff03566ff7
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 25 Jan 2010 20:33:46 +0000

More helpful error message pulling sync data with an unknown item type


Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git 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 = {};