diff Core/Enumerations.cpp @ 2954:d924f9bb61cc

taking advantage of details in OrthancException
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:35:34 +0100
parents 210d5afd8f2b
children cb5d75143da0
line wrap: on
line diff
--- a/Core/Enumerations.cpp	Mon Dec 03 11:49:39 2018 +0100
+++ b/Core/Enumerations.cpp	Mon Dec 03 14:35:34 2018 +0100
@@ -1373,8 +1373,7 @@
 
       if (throwIfUnsupported)
       {
-        LOG(ERROR) << s;
-        throw OrthancException(ErrorCode_ParameterOutOfRange);
+        throw OrthancException(ErrorCode_ParameterOutOfRange, s);
       }
       else
       {
@@ -1510,8 +1509,8 @@
     }
     else
     {
-      LOG(ERROR) << "Unknown modality manufacturer: \"" << manufacturer << "\"";
-      throw OrthancException(ErrorCode_ParameterOutOfRange);
+      throw OrthancException(ErrorCode_ParameterOutOfRange,
+                             "Unknown modality manufacturer: \"" + manufacturer + "\"");
     }
 
     if (obsolete)