Mercurial > hg > orthanc-stone
diff Framework/Loaders/DicomStructureSetLoader.cpp @ 841:266e2b0b9abc
better error reporting in DicomStructureSetLoader + fixed POST request logic
in WebAssemblyOracle + support for LookupTableTextureSceneLayer in OpenGL (NOT
using shaders!) (2 new files) + a few small non-functional changes
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 11 Jun 2019 15:41:21 +0200 |
parents | 28f99af358fa |
children | 2b245953b44b |
line wrap: on
line diff
--- a/Framework/Loaders/DicomStructureSetLoader.cpp Sun Jun 09 18:47:34 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Tue Jun 11 15:41:21 2019 +0200 @@ -92,6 +92,14 @@ lookup[0]["ID"].type() != Json::stringValue || lookup[0]["Type"].asString() != "Instance") { + std::stringstream msg; + msg << "Unknown resource! message.GetAnswer() = " << message.GetAnswer() << " message.GetAnswerHeaders() = "; + for (const auto& it : message.GetAnswerHeaders()) + { + msg << "\nkey: \"" << it.first << "\" value: \"" << it.second << "\"\n"; + } + auto msgStr = msg.str(); + LOG(ERROR) << msgStr; throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); } @@ -138,6 +146,7 @@ command->SetMethod(Orthanc::HttpMethod_Post); command->SetBody(*it); command->SetPayload(new LookupInstance(loader, *it)); + //LOG(TRACE) << "About to schedule a /tools/lookup POST request. URI = " << command->GetUri() << " Body size = " << (*it).size() << " Body = " << (*it) << "\n"; Schedule(command.release()); } }