Mercurial > hg > orthanc
comparison Core/RestApi/RestApiOutput.cpp @ 2954:d924f9bb61cc
taking advantage of details in OrthancException
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Dec 2018 14:35:34 +0100 |
parents | 9d277f8ad698 |
children | 4e43e67f8ecf |
comparison
equal
deleted
inserted
replaced
2953:210d5afd8f2b | 2954:d924f9bb61cc |
---|---|
98 Toolbox::JsonToXml(s, value); | 98 Toolbox::JsonToXml(s, value); |
99 | 99 |
100 output_.SetContentType(MIME_XML_UTF8); | 100 output_.SetContentType(MIME_XML_UTF8); |
101 output_.Answer(s); | 101 output_.Answer(s); |
102 #else | 102 #else |
103 LOG(ERROR) << "Orthanc was compiled without XML support"; | 103 throw OrthancException(ErrorCode_InternalError, |
104 throw OrthancException(ErrorCode_InternalError); | 104 "Orthanc was compiled without XML support"); |
105 #endif | 105 #endif |
106 } | 106 } |
107 else | 107 else |
108 { | 108 { |
109 Json::StyledWriter writer; | 109 Json::StyledWriter writer; |