Fix handling of errors when no message is returned
This commit is contained in:
parent
ff304bd7be
commit
7845588291
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue