Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 2955:bbfd95a0c429
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Dec 2018 14:59:23 +0100 |
parents | 4ceb9bf7b00c |
children | 750de70b3603 |
comparison
equal
deleted
inserted
replaced
2954:d924f9bb61cc | 2955:bbfd95a0c429 |
---|---|
269 const Json::Value& tags, | 269 const Json::Value& tags, |
270 bool decodeBinaryTags) | 270 bool decodeBinaryTags) |
271 { | 271 { |
272 if (tags.type() != Json::objectValue) | 272 if (tags.type() != Json::objectValue) |
273 { | 273 { |
274 LOG(ERROR) << "Tags field is not an array"; | 274 throw OrthancException(ErrorCode_BadRequest, "Tags field is not an array"); |
275 throw OrthancException(ErrorCode_BadRequest); | |
276 } | 275 } |
277 | 276 |
278 // Inject the user-specified tags | 277 // Inject the user-specified tags |
279 Json::Value::Members members = tags.getMemberNames(); | 278 Json::Value::Members members = tags.getMemberNames(); |
280 for (size_t i = 0; i < members.size(); i++) | 279 for (size_t i = 0; i < members.size(); i++) |
408 if (request["Tags"].isMember("SpecificCharacterSet")) | 407 if (request["Tags"].isMember("SpecificCharacterSet")) |
409 { | 408 { |
410 const char* tmp = request["Tags"]["SpecificCharacterSet"].asCString(); | 409 const char* tmp = request["Tags"]["SpecificCharacterSet"].asCString(); |
411 if (!GetDicomEncoding(encoding, tmp)) | 410 if (!GetDicomEncoding(encoding, tmp)) |
412 { | 411 { |
413 LOG(ERROR) << "Unknown specific character set: " << std::string(tmp); | 412 throw OrthancException(ErrorCode_ParameterOutOfRange, |
414 throw OrthancException(ErrorCode_ParameterOutOfRange); | 413 "Unknown specific character set: " + std::string(tmp)); |
415 } | 414 } |
416 } | 415 } |
417 else | 416 else |
418 { | 417 { |
419 encoding = GetDefaultDicomEncoding(); | 418 encoding = GetDefaultDicomEncoding(); |