summaryrefslogtreecommitdiff
path: root/indra/newview/llmarketplacefunctions.cpp
diff options
context:
space:
mode:
authorcoyot@coyot-sager-PC.hsd1.ca.comcast.net <coyot@coyot-sager-PC.hsd1.ca.comcast.net>2017-05-05 18:07:00 +0100
committercoyot@coyot-sager-PC.hsd1.ca.comcast.net <coyot@coyot-sager-PC.hsd1.ca.comcast.net>2017-05-05 18:07:00 +0100
commita1194ce6e9faaa259821611b51d4448fea49ddc1 (patch)
tree4d1c63b64ae44a2a1855d0e10f595495971a044d /indra/newview/llmarketplacefunctions.cpp
parentc15ffb40458184002ade41ff652fab3d9ffbb761 (diff)
parent322767f98e3c3164e3be03daa85580038ca6fb52 (diff)
pull from gate
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rw-r--r--indra/newview/llmarketplacefunctions.cpp11
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);
}