From cb6d4437b4ccfd1879e41f1508d619d33d36f1e9 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 9 Jun 2011 10:31:50 -0400 Subject: SH-1773 WIP --- indra/newview/llmeshrepository.cpp | 45 +++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/newview/llmeshrepository.cpp (limited to 'indra/newview') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp old mode 100644 new mode 100755 index d4198041ec..c90a800a13 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -468,6 +468,48 @@ public: }; +void log_upload_error(const LLSD& content) +{ + if (content.has("error")) + { + const LLSD& err = content["error"]; + llwarns << "mesh upload failed " << err["message"].asString() << " id " << err["identifier"].asString() << llendl; + + if ((err["identifier"].asString() == "NewAgentInventory_InvalidAsset") && + content.has("errors")) + { + const LLSD& err_list = content["errors"]; + for (LLSD::array_const_iterator it = err_list.beginArray(); + it != err_list.endArray(); + ++it) + { + const LLSD& err_entry = *it; + std::string index_info; + std::string texture_index_str = err_entry["TextureIndex"].asString(); + if (!texture_index_str.empty()) + { + index_info += " texture_index: " + texture_index_str; + } + std::string mesh_index_str = err_entry["MeshIndex"].asString(); + if (!mesh_index_str.empty()) + { + index_info += " mesh_index: " + mesh_index_str; + } + llwarns << "mesh err code " << err_entry["error"].asString() + << " message " << err_entry["message"] + << index_info + << llendl; + } + } + } + else + { + llwarns << "bad mesh, no error information available" << llendl; + } + + +} + class LLModelObjectUploadResponder: public LLCurl::Responder { LLSD mObjectAsset; @@ -516,10 +558,11 @@ public: else { llinfos << "upload failed" << llendl; + log_upload_error(content); mThread->mWholeModelUploadURL = ""; } - } + }; class LLWholeModelUploadResponder: public LLCurl::Responder -- cgit v1.2.3