www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ce6cba7974da3cf53c9be97dc571eeeb56364e43
parent fd31e41e2f176f21b9ff4ee95d6881c33aea70b3
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 19 Sep 2014 15:52:53 -0400

Don't log stack trace for getString() failure unless unexpected

Diffstat:
Mchrome/content/zotero/xpcom/search.js | 1+
Mchrome/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 @@ -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 @@ -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;