From 031d78eeeedac8ebdb23fd893cfb31142b3b9824 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 26 Jun 2006 20:41:09 +0000 Subject: [PATCH] Be a bit more helpful when calling getString() on a string with no localization --- chrome/chromeFiles/content/scholar/xpcom/scholar.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/scholar.js b/chrome/chromeFiles/content/scholar/xpcom/scholar.js index 69c0d2b4fa..5fe45fe8cf 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/scholar.js +++ b/chrome/chromeFiles/content/scholar/xpcom/scholar.js @@ -156,7 +156,13 @@ var Scholar = new function(){ function getString(name){ - return _localizedStringBundle.GetStringFromName(name); + try { + var l10n = _localizedStringBundle.GetStringFromName(name); + } + catch (e){ + throw ('Localized string not available for ' + name); + } + return l10n; }