diff OrthancServer/ServerJobs/StorageCommitmentScpJob.cpp @ 3665:4c1d2ff7ddd0 storage-commitment

handling of errors in storage commitment plugin factory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Feb 2020 10:42:30 +0100
parents d8371b4302ff
children 6e5b3ae8825c
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/StorageCommitmentScpJob.cpp	Wed Feb 12 16:06:58 2020 +0100
+++ b/OrthancServer/ServerJobs/StorageCommitmentScpJob.cpp	Thu Feb 13 10:42:30 2020 +0100
@@ -118,16 +118,9 @@
     
     virtual bool Execute(const std::string& jobId) ORTHANC_OVERRIDE
     {
-      if (hasFailureReason_)
-      {
-        throw OrthancException(ErrorCode_BadSequenceOfCalls);
-      }
-      else
-      {
-        failureReason_ = that_.Lookup(index_);
-        hasFailureReason_ = true;
-        return true;
-      }
+      failureReason_ = that_.Lookup(index_);
+      hasFailureReason_ = true;
+      return true;
     }
 
     size_t GetIndex() const