commit 673962e999d88f2f254962c15d60efa8b33184a4
parent 11d9c1df041821dabe7d97cef73bde90abe2e8c3
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 22 Nov 2012 16:38:03 -0500
Log errors thrown by calls to Zotero.Attachments
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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);
}
}
}