From ee589b0ed59deb2855ae0f256f9de5ae7cf31669 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 3 Jul 2008 16:44:52 +0000 Subject: [PATCH] Addresses #1057, Won't start on Windows I suspect this will fix the problem. It will also provide better error reporting for Zotero startup errors such as this one. --- chrome/content/zotero/xpcom/zeroconf.js | 3 +++ components/zotero-service.js | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/zeroconf.js b/chrome/content/zotero/xpcom/zeroconf.js index 8233b0054a..027d5428e3 100644 --- a/chrome/content/zotero/xpcom/zeroconf.js +++ b/chrome/content/zotero/xpcom/zeroconf.js @@ -47,6 +47,9 @@ Zotero.Zeroconf = new function () { if (!Zotero.isMac) { this.clientEnabled = false; this.serverEnabled = false; + + // TODO: Why is Windows breaking without this? + return; } // Make sure we have the client executable diff --git a/components/zotero-service.js b/components/zotero-service.js index 3c640ebaa7..c95d232514 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -46,7 +46,15 @@ Cc["@mozilla.org/moz/jssubscript-loader;1"] // Calls to other XPCOM components must be in here rather than in top-level // code, as other components may not have yet been initialized. function setupService(){ - Zotero.init(); + try { + Zotero.init(); + } + catch (e) { + var msg = typeof e == 'string' ? e : e.name; + dump(e + "\n\n"); + Components.utils.reportError(e); + throw (e); + } } function ZoteroService(){