Ensure error gets shown even if connection to word processor has died
This commit is contained in:
parent
2c2c1c797a
commit
f7f5d8b9d6
1 changed files with 13 additions and 6 deletions
|
@ -664,12 +664,20 @@ Zotero.Integration = new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(displayError) {
|
if(displayError) {
|
||||||
|
var showErrorInFirefox = !document;
|
||||||
|
|
||||||
if(document) {
|
if(document) {
|
||||||
document.activate();
|
try {
|
||||||
document.displayAlert(displayError,
|
document.activate();
|
||||||
Components.interfaces.zoteroIntegrationDocument.DIALOG_ICON_STOP,
|
document.displayAlert(displayError,
|
||||||
Components.interfaces.zoteroIntegrationDocument.DIALOG_BUTTONS_OK);
|
Components.interfaces.zoteroIntegrationDocument.DIALOG_ICON_STOP,
|
||||||
} else {
|
Components.interfaces.zoteroIntegrationDocument.DIALOG_BUTTONS_OK);
|
||||||
|
} catch(e) {
|
||||||
|
showErrorInFirefox = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(showErrorInFirefox) {
|
||||||
Zotero.Integration.activate();
|
Zotero.Integration.activate();
|
||||||
Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
.getService(Components.interfaces.nsIPromptService)
|
.getService(Components.interfaces.nsIPromptService)
|
||||||
|
@ -1544,7 +1552,6 @@ Zotero.Integration.Fields.prototype.updateDocument = function(forceCitations, fo
|
||||||
ignoreCitationChanges, deleteCitations, callback));
|
ignoreCitationChanges, deleteCitations, callback));
|
||||||
}));
|
}));
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
Zotero.logError(e);
|
|
||||||
Zotero.Integration.handleError(e, this._doc);
|
Zotero.Integration.handleError(e, this._doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue