From 673962e999d88f2f254962c15d60efa8b33184a4 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 22 Nov 2012 16:38:03 -0500 Subject: [PATCH] Log errors thrown by calls to Zotero.Attachments --- chrome/content/zotero/xpcom/translation/translate_item.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 5828a751f1..fd9c8b4d87 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -233,6 +233,7 @@ Zotero.Translate.ItemSaver.prototype = { (attachment.title ? attachment.title : undefined)); } catch(e) { Zotero.debug("Translate: Error adding attachment "+attachment.url, 2); + Zotero.logError(e); return; } Zotero.debug("Translate: Created attachment; id is "+myID, 4); @@ -345,6 +346,7 @@ Zotero.Translate.ItemSaver.prototype = { (attachment.title ? attachment.title : undefined)); } catch(e) { Zotero.debug("Translate: Error adding attachment "+attachment.url, 2); + Zotero.logError(e); } } } else { @@ -354,6 +356,7 @@ Zotero.Translate.ItemSaver.prototype = { Zotero.Attachments.importFromDocument(attachment.document, parentID, attachment.title); } catch(e) { Zotero.debug("Translate: Error attaching document", 2); + Zotero.logError(e); } // Save attachment if snapshot pref enabled or not HTML // (in which case downloadAssociatedFiles applies) @@ -368,6 +371,7 @@ Zotero.Translate.ItemSaver.prototype = { fileBaseName, null, mimeType, this._libraryID, null, this._cookieSandbox); } catch(e) { Zotero.debug("Translate: Error adding attachment "+attachment.url, 2); + Zotero.logError(e); } } }