Slightly better handling of startup errors in Standalone

Run the startup error handler or show an alert with the startup error
string, and then quit Zotero
This commit is contained in:
Dan Stillman 2016-11-22 04:35:57 -05:00
parent a4afb8c0c3
commit 693c0286ea

View file

@ -352,6 +352,18 @@ function ZoteroService() {
throw e;
})
.then(function () {
if (isStandalone) {
if (zContext.Zotero.startupErrorHandler || zContext.Zotero.startupError) {
if (zContext.Zotero.startupErrorHandler) {
zContext.Zotero.startupErrorHandler();
}
else if (zContext.Zotero.startupError) {
zContext.alert(zContext.Zotero.startupError);
}
zContext.Zotero.Utilities.Internal.quitZotero();
}
return;
}
zContext.Zotero.debug("Initialized in "+(Date.now() - start)+" ms");
isFirstLoadThisSession = false;
});