Throw plugin incompatibility error properly

This commit is contained in:
Dan Stillman 2010-09-16 15:50:53 +00:00
parent eb95974891
commit 8e3b1615bf

View file

@ -190,12 +190,14 @@ Zotero.Integration = new function() {
_inProgress = false;
_integrationVersionsOK = false;
Zotero.Integration.activate();
var msg = Zotero.getString(
"integration.error.incompatibleVersion2",
[Zotero.version, addon.name, INTEGRATION_MIN_VERSION]
);
Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService)
.alert(null, Zotero.getString("integration.error.title"),
Zotero.getString("integration.error.incompatibleVersion2", [Zotero.version,
addon.name, INTEGRATION_MIN_VERSION]));
throw e;
.alert(null, Zotero.getString("integration.error.title"), msg);
throw msg;
}
}
_integrationVersionsOK = true;