www

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

commit 784558829137308cc39e85283bf7014e8b1c4f61
parent ff304bd7be696d92be8d53b31d833b920c40d5d5
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun, 24 Jul 2011 17:41:00 +0000

Fix handling of errors when no message is returned


Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -327,7 +327,12 @@ Zotero.Translate.Sandbox = { } if(callback) { - callback(sandbox); + try { + callback(sandbox); + } catch(e) { + translate.complete(false, e); + return; + } translate.decrementAsyncProcesses(); } }); @@ -1279,7 +1284,9 @@ Zotero.Translate.Base.prototype = { errorString += "\n"+i+' => '+error[i]; } } - errorString += "\nstring => "+error.toString(); + if(error) { + errorString += "\nstring => "+error.toString(); + } } errorString += "\nurl => "+this.path