From 693c0286eab490d243a9d8763a6a5d21d284e408 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 22 Nov 2016 04:35:57 -0500 Subject: [PATCH] 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 --- components/zotero-service.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/zotero-service.js b/components/zotero-service.js index ce6ff86947..9d8de54b20 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -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; });