comparison OrthancServer/Sources/DicomInstanceToStore.cpp @ 5663:3765085693e5 large-queries

merge default -> large-queries
author Alain Mazy <am@orthanc.team>
date Thu, 04 Jul 2024 07:40:58 +0200
parents f7adfb22e20e
children
comparison
equal deleted inserted replaced
5553:28cc06e4859a 5663:3765085693e5
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium 4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium 7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 * 8 *
8 * This program is free software: you can redistribute it and/or 9 * This program is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as 10 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation, either version 3 of the 11 * published by the Free Software Foundation, either version 3 of the
130 { 131 {
131 if (buffer_.get() == NULL) 132 if (buffer_.get() == NULL)
132 { 133 {
133 buffer_.reset(new std::string); 134 buffer_.reset(new std::string);
134 135
135 if (!FromDcmtkBridge::SaveToMemoryBuffer(*buffer_, dataset_)) 136 std::string errorMessage;
137 if (!FromDcmtkBridge::SaveToMemoryBuffer(*buffer_, dataset_, errorMessage))
136 { 138 {
137 throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory"); 139 throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory: " + errorMessage);
138 } 140 }
139 } 141 }
140 } 142 }
141 143
142 public: 144 public: