Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
840:47fc7919977d | 841:266e2b0b9abc |
---|---|
90 !lookup[0].isMember("Path") || | 90 !lookup[0].isMember("Path") || |
91 lookup[0]["Type"].type() != Json::stringValue || | 91 lookup[0]["Type"].type() != Json::stringValue || |
92 lookup[0]["ID"].type() != Json::stringValue || | 92 lookup[0]["ID"].type() != Json::stringValue || |
93 lookup[0]["Type"].asString() != "Instance") | 93 lookup[0]["Type"].asString() != "Instance") |
94 { | 94 { |
95 std::stringstream msg; | |
96 msg << "Unknown resource! message.GetAnswer() = " << message.GetAnswer() << " message.GetAnswerHeaders() = "; | |
97 for (const auto& it : message.GetAnswerHeaders()) | |
98 { | |
99 msg << "\nkey: \"" << it.first << "\" value: \"" << it.second << "\"\n"; | |
100 } | |
101 auto msgStr = msg.str(); | |
102 LOG(ERROR) << msgStr; | |
95 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); | 103 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); |
96 } | 104 } |
97 | 105 |
98 const std::string instanceId = lookup[0]["ID"].asString(); | 106 const std::string instanceId = lookup[0]["ID"].asString(); |
99 | 107 |
136 std::auto_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); | 144 std::auto_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); |
137 command->SetUri("/tools/lookup"); | 145 command->SetUri("/tools/lookup"); |
138 command->SetMethod(Orthanc::HttpMethod_Post); | 146 command->SetMethod(Orthanc::HttpMethod_Post); |
139 command->SetBody(*it); | 147 command->SetBody(*it); |
140 command->SetPayload(new LookupInstance(loader, *it)); | 148 command->SetPayload(new LookupInstance(loader, *it)); |
149 //LOG(TRACE) << "About to schedule a /tools/lookup POST request. URI = " << command->GetUri() << " Body size = " << (*it).size() << " Body = " << (*it) << "\n"; | |
141 Schedule(command.release()); | 150 Schedule(command.release()); |
142 } | 151 } |
143 } | 152 } |
144 }; | 153 }; |
145 | 154 |