diff OrthancServer/Scheduler/StoreScuCommand.cpp @ 1165:0561f2087cc9

Fix reporting of errors in Orthanc Explorer when sending images to peers/modalities
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 18 Sep 2014 17:48:55 +0200
parents 060e8918d7a4
children 6e7e5ed91c2d
line wrap: on
line diff
--- a/OrthancServer/Scheduler/StoreScuCommand.cpp	Thu Sep 18 17:18:26 2014 +0200
+++ b/OrthancServer/Scheduler/StoreScuCommand.cpp	Thu Sep 18 17:48:55 2014 +0200
@@ -37,9 +37,11 @@
 namespace Orthanc
 {
   StoreScuCommand::StoreScuCommand(ServerContext& context,
-                                 const RemoteModalityParameters& modality) : 
+                                   const RemoteModalityParameters& modality,
+                                   bool ignoreExceptions) : 
     context_(context),
-    modality_(modality)
+    modality_(modality),
+    ignoreExceptions_(ignoreExceptions)
   {
   }
 
@@ -69,6 +71,11 @@
         // powered off)
         LOG(ERROR) << "Unable to forward to a modality in a Lua script (instance " 
                    << *it << "): " << e.What();
+
+        if (!ignoreExceptions_)
+        {
+          throw;
+        }
       }
     }