changeset 122:fd547b351dce dev

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 Jun 2016 15:53:47 +0200
parents ae6026561f75
children d0f72cc15602
files Orthanc/Core/WebServiceParameters.cpp Plugin/DicomWebPeers.cpp Plugin/StowRsClient.cpp
diffstat 3 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Orthanc/Core/WebServiceParameters.cpp	Tue Jun 21 17:11:12 2016 +0200
+++ b/Orthanc/Core/WebServiceParameters.cpp	Wed Jun 22 15:53:47 2016 +0200
@@ -209,6 +209,10 @@
         throw OrthancException(ErrorCode_BadFileFormat);
       }
     }
+    catch (OrthancException&)
+    {
+      throw;
+    }
     catch (...)
     {
       throw OrthancException(ErrorCode_BadFileFormat);
--- a/Plugin/DicomWebPeers.cpp	Tue Jun 21 17:11:12 2016 +0200
+++ b/Plugin/DicomWebPeers.cpp	Wed Jun 22 15:53:47 2016 +0200
@@ -66,9 +66,12 @@
         }
       }
     }
-    catch (Orthanc::OrthancException&)
+    catch (Orthanc::OrthancException& e)
     {
-      ok = false;
+      std::string s = ("Exception while parsing the \"DicomWeb.Peers\" section "
+                       "of the configuration file: " + std::string(e.What()));
+      OrthancPluginLogError(context_, s.c_str());
+      throw;
     }
 
     if (!ok)
--- a/Plugin/StowRsClient.cpp	Tue Jun 21 17:11:12 2016 +0200
+++ b/Plugin/StowRsClient.cpp	Wed Jun 22 15:53:47 2016 +0200
@@ -129,9 +129,9 @@
   std::string url = peer.GetUrl() + "studies";
 
   uint16_t status = 0;
-  OrthancPluginMemoryBuffer answer;
+  OrthancPluginMemoryBuffer answerBody;
   OrthancPluginErrorCode code = OrthancPluginHttpClient(
-    context_, &answer, 
+    context_, &answerBody, 
     NULL,                                 /* No interest in the HTTP headers of the answer */
     &status, 
     OrthancPluginHttpMethod_Post,
@@ -157,9 +157,9 @@
 
   Json::Value response;
   Json::Reader reader;
-  bool success = reader.parse(reinterpret_cast<const char*>(answer.data),
-                              reinterpret_cast<const char*>(answer.data) + answer.size, response);
-  OrthancPluginFreeMemoryBuffer(context_, &answer);
+  bool success = reader.parse(reinterpret_cast<const char*>(answerBody.data),
+                              reinterpret_cast<const char*>(answerBody.data) + answerBody.size, response);
+  OrthancPluginFreeMemoryBuffer(context_, &answerBody);
 
   if (!success ||
       response.type() != Json::objectValue ||