comparison Framework/Plugins/StorageBackend.cpp @ 505:38e428f8179d

more detailed error messages
author Alain Mazy <am@orthanc.team>
date Fri, 24 May 2024 16:39:38 +0200
parents ecd0b719cff5
children 54d518dcd74a
comparison
equal deleted inserted replaced
504:fe1897618c08 505:38e428f8179d
137 137
138 statement.Execute(args); 138 statement.Execute(args);
139 139
140 if (statement.IsDone()) 140 if (statement.IsDone())
141 { 141 {
142 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); 142 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "ReadWhole: No content found for storage.");
143 } 143 }
144 else if (statement.GetResultFieldsCount() != 1) 144 else if (statement.GetResultFieldsCount() != 1)
145 { 145 {
146 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 146 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
147 } 147 }
206 206
207 statement.Execute(args); 207 statement.Execute(args);
208 208
209 if (statement.IsDone()) 209 if (statement.IsDone())
210 { 210 {
211 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); 211 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "ReadRange: No content found for storage.");
212 } 212 }
213 else if (statement.GetResultFieldsCount() != 1) 213 else if (statement.GetResultFieldsCount() != 1)
214 { 214 {
215 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 215 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
216 } 216 }