diff 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
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp	Mon Dec 03 14:35:34 2018 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp	Mon Dec 03 14:59:23 2018 +0100
@@ -271,8 +271,7 @@
   {
     if (tags.type() != Json::objectValue)
     {
-      LOG(ERROR) << "Tags field is not an array";
-      throw OrthancException(ErrorCode_BadRequest);
+      throw OrthancException(ErrorCode_BadRequest, "Tags field is not an array");
     }
 
     // Inject the user-specified tags
@@ -410,8 +409,8 @@
         const char* tmp = request["Tags"]["SpecificCharacterSet"].asCString();
         if (!GetDicomEncoding(encoding, tmp))
         {
-          LOG(ERROR) << "Unknown specific character set: " << std::string(tmp);
-          throw OrthancException(ErrorCode_ParameterOutOfRange);
+          throw OrthancException(ErrorCode_ParameterOutOfRange,
+                                 "Unknown specific character set: " + std::string(tmp));
         }
       }
       else