Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
5611:1a995c6f9dae | 5624:790335c99713 |
---|---|
130 { | 130 { |
131 if (buffer_.get() == NULL) | 131 if (buffer_.get() == NULL) |
132 { | 132 { |
133 buffer_.reset(new std::string); | 133 buffer_.reset(new std::string); |
134 | 134 |
135 if (!FromDcmtkBridge::SaveToMemoryBuffer(*buffer_, dataset_)) | 135 std::string errorMessage; |
136 if (!FromDcmtkBridge::SaveToMemoryBuffer(*buffer_, dataset_, errorMessage)) | |
136 { | 137 { |
137 throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory"); | 138 throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory: " + errorMessage); |
138 } | 139 } |
139 } | 140 } |
140 } | 141 } |
141 | 142 |
142 public: | 143 public: |