Mercurial > hg > orthanc
diff OrthancServer/Scheduler/StorePeerCommand.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 | 88010d8e12cf |
line wrap: on
line diff
--- a/OrthancServer/Scheduler/StorePeerCommand.cpp Thu Sep 18 17:18:26 2014 +0200 +++ b/OrthancServer/Scheduler/StorePeerCommand.cpp Thu Sep 18 17:48:55 2014 +0200 @@ -39,9 +39,11 @@ namespace Orthanc { StorePeerCommand::StorePeerCommand(ServerContext& context, - const OrthancPeerParameters& peer) : + const OrthancPeerParameters& peer, + bool ignoreExceptions) : context_(context), - peer_(peer) + peer_(peer), + ignoreExceptions_(ignoreExceptions) { } @@ -84,6 +86,11 @@ { LOG(ERROR) << "Unable to forward to an Orthanc peer in a Lua script (instance " << *it << ", peer " << peer_.GetUrl() << "): " << e.What(); + + if (!ignoreExceptions_) + { + throw; + } } }