commit 02f2a5b51cc9251f41b8dfcb2b7833c20f51cd9b parent 312035de100cc888a0c45bbd57cfcc108668baf8 Author: Dan Stillman <dstillman@zotero.org> Date: Wed, 25 Nov 2009 02:27:08 +0000 Auto-reset on a couple "Cannot set source to invalid item" sync errors Diffstat:
| M | chrome/content/zotero/xpcom/data/item.js | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -1373,7 +1373,8 @@ Zotero.Item.prototype.save = function() { if (!newSourceItem) { // TODO: clear caches? - throw ("Cannot set source to invalid item " + this._sourceItem); + var msg = "Cannot set source to invalid item " + this._sourceItem; + var e = new Zotero.Error(msg, "MISSING_OBJECT"); } var newSourceItemNotifierData = {}; @@ -1759,7 +1760,9 @@ Zotero.Item.prototype.save = function() { if (!newSourceItem) { // TODO: clear caches - throw ("Cannot set source to invalid item " + this._sourceItem); + var msg = "Cannot set source to invalid item " + this._sourceItem; + var e = new Zotero.Error(msg, "MISSING_OBJECT"); + throw (e); } var newSourceItemNotifierData = {};