Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi2.cpp @ 218:0200cd330582
fixes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 13:27:33 +0100 |
parents | 1ac3aacd10a5 |
children | 4eb0c7ce86c9 |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi2.cpp Thu Nov 29 12:22:23 2012 +0100 +++ b/OrthancServer/OrthancRestApi2.cpp Thu Nov 29 13:27:33 2012 +0100 @@ -256,15 +256,18 @@ FromDcmtkBridge::ExtractPngImage(png, dicomContent, frame, mode); call.GetOutput().AnswerBuffer(png, "image/png"); } - catch (OrthancException&) + catch (OrthancException& e) { - std::string root = ""; - for (size_t i = 1; i < call.GetFullUri().size(); i++) + if (e.GetErrorCode() == ErrorCode_NotImplemented) { - root += "../"; + std::string root = ""; + for (size_t i = 1; i < call.GetFullUri().size(); i++) + { + root += "../"; + } + + call.GetOutput().Redirect(root + "app/images/unsupported.png"); } - - call.GetOutput().Redirect(root + "app/images/unsupported.png"); } } }