Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Loaders/DicomStructureSetLoader.cpp @ 1758:4ee11b8773e2
Better error description in case of network json payload errors
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 26 Apr 2021 20:41:38 +0200 |
parents | 946eb7200b82 |
children | adb59bcb0fc5 |
comparison
equal
deleted
inserted
replaced
1757:28979b77ce90 | 1758:4ee11b8773e2 |
---|---|
147 { | 147 { |
148 msg << "\nkey: \"" << it->first << "\" value: \"" << it->second << "\"\n"; | 148 msg << "\nkey: \"" << it->first << "\" value: \"" << it->second << "\"\n"; |
149 } | 149 } |
150 const std::string msgStr = msg.str(); | 150 const std::string msgStr = msg.str(); |
151 LOG(ERROR) << msgStr; | 151 LOG(ERROR) << msgStr; |
152 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); | 152 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadJson); |
153 } | 153 } |
154 | 154 |
155 const std::string instanceId = lookup[0]["ID"].asString(); | 155 const std::string instanceId = lookup[0]["ID"].asString(); |
156 | 156 |
157 { | 157 { |