summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-03-20 11:09:11 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-03-20 11:09:11 +0200
commit459d5c6c32ccc83de5bc6da0812aaa9d4f788052 (patch)
treea857c4d7fb3ad65a5956ebc79da317e9b0efa49b /indra
parent1132b33028b056fce6474879e06b077c6f9cb50e (diff)
MAINT-7117 Don't Show "Unknown error" in warning dialog
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmarketplacefunctions.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml3
2 files changed, 11 insertions, 3 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);
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index bcdd182627..3fcd91f89b 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -341,8 +341,7 @@ Initialization with the Marketplace failed because of a system or network error.
type="alertmodal">
The transaction with the Marketplace failed with the following error :
- Reason : &apos;[ERROR_REASON]&apos;
- [ERROR_DESCRIPTION]
+ [ERROR_REASON][ERROR_DESCRIPTION]
<usetemplate
name="okbutton"