summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-07-06 17:51:07 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-07-06 17:51:07 -0700
commit33d1aa30ab25cd0a0fd4bbd6728b1277e73c45d2 (patch)
treeaa737a3258a409e539f378744b990294bac6115d /indra/llcommon/llstring.cpp
parent86ba458ebcc979bdd03b490842311bd5621fb0b4 (diff)
parentdc6c35e353b991db2651d26bc76e5b3ee9921157 (diff)
Merge from dessie/viewer-release
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 8277928d4d..e9a54c3bf4 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -997,7 +997,14 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals)
convertToS32 (decimals, intDecimals);
if (!sLocale.empty())
{
- strStream.imbue (std::locale(sLocale.c_str()));
+ // std::locale() throws if the locale is unknown! (EXT-7926)
+ try
+ {
+ strStream.imbue(std::locale(sLocale.c_str()));
+ } catch (const std::exception &)
+ {
+ LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL;
+ }
}
if (!intDecimals)