diff options
author | Callum Prentice <callum@gmail.com> | 2017-04-21 14:32:13 -0700 |
---|---|---|
committer | Callum Prentice <callum@gmail.com> | 2017-04-21 14:32:13 -0700 |
commit | 2a5c47eb083a55cccb60916263b3c2b5d8d9c4fe (patch) | |
tree | ec40f2091563c690e06fb16d54b84d0e65bef39a /indra/newview/llmarketplacefunctions.cpp | |
parent | 8846f9c7c19f85118da7d5601ad1dd14e491b6f5 (diff) | |
parent | 5f6bcaf456469f07d23a5599a1fed59420fd6ae7 (diff) |
Automated merge with tip of viewer64 (after it was merged with viewer-release)
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rw-r--r-- | indra/newview/llmarketplacefunctions.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 54f95520db..a0e19f2d19 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -121,7 +121,6 @@ namespace { { // Prompt the user with the warning (so they know why things are failing) LLSD subs; - subs["[ERROR_REASON]"] = reason; // We do show long descriptions in the alert (unlikely to be readable). The description string will be in the log though. std::string description; if (result.has(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_CONTENT)) @@ -145,6 +144,16 @@ namespace { { description = result.asString(); } + std::string reason_lc = reason; + LLStringUtil::toLower(reason_lc); + if (!description.empty() && reason_lc.find("unknown") != std::string::npos) + { + subs["[ERROR_REASON]"] = ""; + } + else + { + subs["[ERROR_REASON]"] = "'" + reason +"'\n"; + } subs["[ERROR_DESCRIPTION]"] = description; LLNotificationsUtil::add("MerchantTransactionFailed", subs); } |