comparison OrthancServer/ServerContext.cpp @ 1582:bd1889029cbb

encoding of exceptions
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Aug 2015 17:39:38 +0200
parents 0c29ebe80ac9
children eb8fbcf008b5
comparison
equal deleted inserted replaced
1581:357c4bb15701 1582:bd1889029cbb
328 ReadFile(s, instancePublicId, FileContentType_DicomAsJson); 328 ReadFile(s, instancePublicId, FileContentType_DicomAsJson);
329 329
330 Json::Reader reader; 330 Json::Reader reader;
331 if (!reader.parse(s, result)) 331 if (!reader.parse(s, result))
332 { 332 {
333 throw OrthancException("Corrupted JSON file"); 333 throw OrthancException(ErrorCode_CorruptedFile);
334 } 334 }
335 } 335 }
336 336
337 337
338 void ServerContext::ReadFile(std::string& result, 338 void ServerContext::ReadFile(std::string& result,