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) {
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