diff OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.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 1a775f4ee672
children 3889ae96d2e9
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp	Mon Apr 26 17:37:54 2021 +0200
+++ b/OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp	Mon Apr 26 20:41:38 2021 +0200
@@ -350,7 +350,7 @@
       
     if (body.type() != Json::objectValue)
     {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol);
+      throw Orthanc::OrthancException(Orthanc::ErrorCode_BadJson, "JSON body should be an object value");
     }
 
     {
@@ -574,11 +574,11 @@
   OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()
   {
     LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()";
-  }
-
-  void OrthancSeriesVolumeProgressiveLoader::SetStartCenter(bool startCenter)
-  {
-      startCenter_ = startCenter;
+  }
+
+  void OrthancSeriesVolumeProgressiveLoader::SetStartCenter(bool startCenter)
+  {
+      startCenter_ = startCenter;
   }
 
   void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count)