Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/MultitenantDicom/StoreRequestHandler.cpp @ 5624:790335c99713
more detailed error message for 'Cannot write DICOM file to memory'
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 14 May 2024 09:47:50 +0200 |
parents | 48b8dae6dc77 |
children | f7adfb22e20e |
comparison
equal
deleted
inserted
replaced
5611:1a995c6f9dae | 5624:790335c99713 |
---|---|
36 const std::string& remoteIp, | 36 const std::string& remoteIp, |
37 const std::string& remoteAet, | 37 const std::string& remoteAet, |
38 const std::string& calledAet) | 38 const std::string& calledAet) |
39 { | 39 { |
40 std::string buffer; | 40 std::string buffer; |
41 std::string errorMessage; | |
41 | 42 |
42 if (!Orthanc::FromDcmtkBridge::SaveToMemoryBuffer(buffer, dicom)) | 43 if (!Orthanc::FromDcmtkBridge::SaveToMemoryBuffer(buffer, dicom, errorMessage)) |
43 { | 44 { |
44 LOG(ERROR) << "Cannot write DICOM file to memory"; | 45 LOG(ERROR) << "Cannot write DICOM file to memory: " << errorMessage; |
45 return STATUS_STORE_Error_CannotUnderstand; | 46 return STATUS_STORE_Error_CannotUnderstand; |
46 } | 47 } |
47 | 48 |
48 Json::Value info; | 49 Json::Value info; |
49 if (!OrthancPlugins::RestApiPost(info, "/instances", buffer, false)) | 50 if (!OrthancPlugins::RestApiPost(info, "/instances", buffer, false)) |