From 6524e17deda72901aa3abcd5252b3bb01c739291 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Thu, 21 Mar 2013 02:42:29 -0500 Subject: [PATCH] Show error message when attaching file fails. --- chrome/content/zotero/xpcom/translation/translate_item.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index d30c65ed74..aca7e64385 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -294,7 +294,7 @@ Zotero.Translate.ItemSaver.prototype = { var uri = IOService.newURI(Zotero.File.encodeFilePath(path), "", this._baseURI); } catch (e) { - var msg = "Error parsing attachment path: " + path; + var msg = "Error parsing attachment path: " + path + "\n" + e.message; Zotero.logError(msg); Zotero.debug("Translate: " + msg, 2); return false; @@ -303,14 +303,14 @@ Zotero.Translate.ItemSaver.prototype = { try { var file = uri.QueryInterface(Components.interfaces.nsIFileURL).file; if (file.path == '/') { - var msg = "Error parsing attachment path: " + path; + var msg = "Error parsing attachment path: " + path + "\nRoot path returned."; Zotero.logError(msg); Zotero.debug("Translate: " + msg, 2); return false; } } catch (e) { - var msg = "Error getting file from attachment path: " + path; + var msg = "Error getting file from attachment path: " + path + "\n" + e.message; Zotero.logError(msg); Zotero.debug("Translate: " + msg, 2); return false;