Mercurial > hg > orthanc
diff OrthancServer/Sources/DicomInstanceToStore.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 |
line wrap: on
line diff
--- a/OrthancServer/Sources/DicomInstanceToStore.cpp Thu May 09 10:43:10 2024 +0200 +++ b/OrthancServer/Sources/DicomInstanceToStore.cpp Tue May 14 09:47:50 2024 +0200 @@ -132,9 +132,10 @@ { buffer_.reset(new std::string); - if (!FromDcmtkBridge::SaveToMemoryBuffer(*buffer_, dataset_)) + std::string errorMessage; + if (!FromDcmtkBridge::SaveToMemoryBuffer(*buffer_, dataset_, errorMessage)) { - throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory"); + throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory: " + errorMessage); } } }