diff options
author | Rider Linden <rider@lindenlab.com> | 2015-08-25 11:40:36 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-08-25 11:40:36 -0700 |
commit | 96bb17f20bbcdc595f3a615a3129e134595b3a4a (patch) | |
tree | e51e47f79b78a076e821360763196cc72c154aad /indra/newview/llmeshrepository.cpp | |
parent | 7c61728b4bae928b2461f0f933dd1c1fa34ef0aa (diff) | |
parent | 1be63209331d509396bd7ee79302d511fe83d72e (diff) |
Merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index c34d04c98e..5bd9df54e2 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 "llstatusbar.h" #include "llinventorypanel.h" #include "lluploaddialog.h" @@ -708,12 +709,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"]; @@ -723,8 +728,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(); @@ -732,6 +740,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(); @@ -748,6 +763,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() |