From 1c83646212b482a2d37fbcba82d0455b6f07cab7 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 16 Feb 2012 14:22:50 -0500 Subject: [PATCH] Avoid throwing if attempt to catch startup errors somehow fails? --- chrome/content/zotero/xpcom/zotero.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 89cd65a9e7..03105b345c 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -434,9 +434,13 @@ const ZOTERO_CONFIG = { var cs = Components.classes["@mozilla.org/consoleservice;1"]. getService(Components.interfaces.nsIConsoleService); // Get startup errors - var messages = {}; - cs.getMessageArray(messages, {}); - _startupErrors = [msg for each(msg in messages.value) if(_shouldKeepError(msg))]; + try { + var messages = {}; + cs.getMessageArray(messages, {}); + _startupErrors = [msg for each(msg in messages.value) if(_shouldKeepError(msg))]; + } catch(e) { + Zotero.logError(e); + } // Register error observer cs.registerListener(ConsoleListener);