summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-06-23 10:55:32 -0700
committerDessie Linden <dessie@lindenlab.com>2010-06-23 10:55:32 -0700
commit70cf100f747dd3511c5e1dda668ddb97487b98ab (patch)
tree5108f22422673308bbb705ad92becec254deee5c /indra/llcommon/llstring.cpp
parent63be74f57c5a520e308a90d44e58ae5e5ba2e6bf (diff)
parent6c57abb295447f2b44eb833cb77fa718dc2b1118 (diff)
Merged from 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 f14d947734..1561bda201 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -994,7 +994,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)