Fix handling of errors when no message is returned

This commit is contained in:
Simon Kornblith 2011-07-24 17:41:00 +00:00
parent ff304bd7be
commit 7845588291

View file

@ -327,7 +327,12 @@ Zotero.Translate.Sandbox = {
} }
if(callback) { if(callback) {
try {
callback(sandbox); callback(sandbox);
} catch(e) {
translate.complete(false, e);
return;
}
translate.decrementAsyncProcesses(); translate.decrementAsyncProcesses();
} }
}); });
@ -1279,8 +1284,10 @@ Zotero.Translate.Base.prototype = {
errorString += "\n"+i+' => '+error[i]; errorString += "\n"+i+' => '+error[i];
} }
} }
if(error) {
errorString += "\nstring => "+error.toString(); errorString += "\nstring => "+error.toString();
} }
}
errorString += "\nurl => "+this.path errorString += "\nurl => "+this.path
+ "\ndownloadAssociatedFiles => "+Zotero.Prefs.get("downloadAssociatedFiles") + "\ndownloadAssociatedFiles => "+Zotero.Prefs.get("downloadAssociatedFiles")