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

This commit is contained in:
Dan Stillman 2014-09-19 15:52:53 -04:00
parent fd31e41e2f
commit ce6cba7974
2 changed files with 5 additions and 2 deletions

View file

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

View file

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