summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2015-01-22 20:57:15 +0200
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2015-01-22 20:57:15 +0200
commit8e081ec5a2f33c0eaf3aeee7b925cbfa43996213 (patch)
tree52ee50a3d1579d4dfe91e62b6275880ac9b0b44a /indra/newview/llmeshrepository.cpp
parent00f53244c8dacfb65def11445823761917bf25bc (diff)
MAINT-4794 FIXED Present informative dialog if mesh upload fails due to specific reason
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 648056484e..9a0bd9d1bc 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -72,6 +72,7 @@
#include "bufferstream.h"
#include "llfasttimer.h"
#include "llcorehttputil.h"
+#include "lltrans.h"
#include "boost/lexical_cast.hpp"
@@ -693,12 +694,16 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
args["MESSAGE"] = message;
args["IDENTIFIER"] = identifier;
args["LABEL"] = model_name;
- gMeshRepo.uploadError(args);
// Log details.
LL_WARNS(LOG_MESH) << "Error in stage: " << stage
<< ", Reason: " << status.toString()
<< " (" << status.toTerseString() << ")" << LL_ENDL;
+
+ std::ostringstream details;
+ typedef std::set<std::string> mav_errors_set_t;
+ mav_errors_set_t mav_errors;
+
if (content.has("error"))
{
const LLSD& err = content["error"];
@@ -708,8 +713,11 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
<< "', message '" << err["message"].asString()
<< "', id '" << err["identifier"].asString()
<< "'" << LL_ENDL;
+
if (err.has("errors"))
{
+ details << std::endl << std::endl;
+
S32 error_num = 0;
const LLSD& err_list = err["errors"];
for (LLSD::array_const_iterator it = err_list.beginArray();
@@ -717,6 +725,13 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
++it)
{
const LLSD& err_entry = *it;
+ std::string message = err_entry["message"];
+
+ if (message.length() > 0)
+ {
+ mav_errors.insert(message);
+ }
+
LL_WARNS(LOG_MESH) << " error[" << error_num << "]:" << LL_ENDL;
for (LLSD::map_const_iterator map_it = err_entry.beginMap();
map_it != err_entry.endMap();
@@ -733,6 +748,21 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
{
LL_WARNS(LOG_MESH) << "Bad response to mesh request, no additional error information available." << LL_ENDL;
}
+
+ mav_errors_set_t::iterator mav_errors_it = mav_errors.begin();
+ for (; mav_errors_it != mav_errors.end(); ++mav_errors_it)
+ {
+ std::string mav_details = "Mav_Details_" + *mav_errors_it;
+ details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl;
+ }
+
+ std::string details_str = details.str();
+ if (details_str.length() > 0)
+ {
+ args["DETAILS"] = details_str;
+ }
+
+ gMeshRepo.uploadError(args);
}
LLMeshRepoThread::LLMeshRepoThread()