diff Core/JobsEngine/GenericJobUnserializer.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 2540ac79ab6c
children 4e43e67f8ecf
line wrap: on
line diff
--- a/Core/JobsEngine/GenericJobUnserializer.cpp	Mon Dec 03 11:49:39 2018 +0100
+++ b/Core/JobsEngine/GenericJobUnserializer.cpp	Mon Dec 03 14:35:34 2018 +0100
@@ -55,8 +55,8 @@
     }
     else
     {
-      LOG(ERROR) << "Cannot unserialize job of type: " << type;
-      throw OrthancException(ErrorCode_BadFileFormat);
+      throw OrthancException(ErrorCode_BadFileFormat,
+                             "Cannot unserialize job of type: " + type);
     }
   }
 
@@ -71,8 +71,8 @@
     }
     else
     {
-      LOG(ERROR) << "Cannot unserialize operation of type: " << type;
-      throw OrthancException(ErrorCode_BadFileFormat);
+      throw OrthancException(ErrorCode_BadFileFormat,
+                             "Cannot unserialize operation of type: " + type);
     }
   }
 
@@ -91,8 +91,8 @@
     }
     else
     {
-      LOG(ERROR) << "Cannot unserialize value of type: " << type;
-      throw OrthancException(ErrorCode_BadFileFormat);
+      throw OrthancException(ErrorCode_BadFileFormat,
+                             "Cannot unserialize value of type: " + type);
     }
   }
 }