comparison 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
comparison
equal deleted inserted replaced
3664:85acfcc15829 3665:4c1d2ff7ddd0
116 return CommandType_Lookup; 116 return CommandType_Lookup;
117 } 117 }
118 118
119 virtual bool Execute(const std::string& jobId) ORTHANC_OVERRIDE 119 virtual bool Execute(const std::string& jobId) ORTHANC_OVERRIDE
120 { 120 {
121 if (hasFailureReason_) 121 failureReason_ = that_.Lookup(index_);
122 { 122 hasFailureReason_ = true;
123 throw OrthancException(ErrorCode_BadSequenceOfCalls); 123 return true;
124 }
125 else
126 {
127 failureReason_ = that_.Lookup(index_);
128 hasFailureReason_ = true;
129 return true;
130 }
131 } 124 }
132 125
133 size_t GetIndex() const 126 size_t GetIndex() const
134 { 127 {
135 return index_; 128 return index_;