comparison Framework/Plugins/StorageBackend.cpp @ 521:2ab3d45c0b3c large-queries

merge default -> large-queries
author Alain Mazy <am@orthanc.team>
date Thu, 04 Jul 2024 07:44:39 +0200
parents 54d518dcd74a
children
comparison
equal deleted inserted replaced
501:594859656a06 521:2ab3d45c0b3c
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 Affero General Public License 10 * modify it under the terms of the GNU Affero General Public License
10 * as published by the Free Software Foundation, either version 3 of 11 * as published by the Free Software Foundation, either version 3 of
137 138
138 statement.Execute(args); 139 statement.Execute(args);
139 140
140 if (statement.IsDone()) 141 if (statement.IsDone())
141 { 142 {
142 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); 143 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "ReadWhole: No content found for storage.");
143 } 144 }
144 else if (statement.GetResultFieldsCount() != 1) 145 else if (statement.GetResultFieldsCount() != 1)
145 { 146 {
146 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 147 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
147 } 148 }
206 207
207 statement.Execute(args); 208 statement.Execute(args);
208 209
209 if (statement.IsDone()) 210 if (statement.IsDone())
210 { 211 {
211 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); 212 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "ReadRange: No content found for storage.");
212 } 213 }
213 else if (statement.GetResultFieldsCount() != 1) 214 else if (statement.GetResultFieldsCount() != 1)
214 { 215 {
215 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 216 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
216 } 217 }