From ce6cba7974da3cf53c9be97dc571eeeb56364e43 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 19 Sep 2014 15:52:53 -0400 Subject: [PATCH] Don't log stack trace for getString() failure unless unexpected --- chrome/content/zotero/xpcom/search.js | 1 + chrome/content/zotero/xpcom/zotero.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index a351ed73c..fde3ab0dd 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -2383,6 +2383,7 @@ Zotero.SearchConditions = new function(){ return Zotero.getString('searchConditions.' + str) } catch (e) { + Zotero.debug("String not found for searchConditions." + str, 2); return Zotero.ItemFields.getLocalizedString(null, str); } } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index da8c65f7d..7d6f652a7 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1447,8 +1447,10 @@ Components.utils.import("resource://gre/modules/Services.jsm"); if (e.name == 'NS_ERROR_ILLEGAL_VALUE') { Zotero.debug(params, 1); } - Components.utils.reportError(e); - Zotero.debug(e, 1); + else if (e.name != 'NS_ERROR_FAILURE') { + Components.utils.reportError(e); + Zotero.debug(e, 1); + } throw ('Localized string not available for ' + name); } return l10n;