Avoid throwing if attempt to catch startup errors somehow fails?

This commit is contained in:
Simon Kornblith 2012-02-16 14:22:50 -05:00
parent a402350cda
commit 1c83646212

View file

@ -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);