Mercurial > hg > orthanc
diff OrthancServer/Plugins/Engine/OrthancPlugins.cpp @ 4087:dcf4d83374a6 framework
integration mainline->framework
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 26 Jun 2020 09:47:51 +0200 |
parents | Plugins/Engine/OrthancPlugins.cpp@4cd94ed75a5b Plugins/Engine/OrthancPlugins.cpp@55727d85f419 |
children | c02a2d9efbc2 |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue Jun 23 07:39:42 2020 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Fri Jun 26 09:47:51 2020 +0200 @@ -5131,15 +5131,15 @@ OrthancPluginErrorCode errorCode = handler( &reader, matcher.GetFlatUri().c_str(), &converter.GetRequest()); - if (reader == NULL) + if (errorCode != OrthancPluginErrorCode_Success) + { + throw OrthancException(static_cast<ErrorCode>(errorCode)); + } + else if (reader == NULL) { // The plugin has not created a reader for chunked body return false; } - else if (errorCode != OrthancPluginErrorCode_Success) - { - throw OrthancException(static_cast<ErrorCode>(errorCode)); - } else { target.reset(new HttpServerChunkedReader(reader, callback->GetParameters(), GetErrorDictionary()));