comparison Framework/Common/Query.cpp @ 70:e6c13ddd26d9 db-changes

all integration tests passing with LookupResources extension
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 03 Jan 2019 14:04:46 +0100
parents 714c5d2bee76
children 4cd7e45b671e
comparison
equal deleted inserted replaced
69:19764fc60ade 70:e6c13ddd26d9
123 { 123 {
124 Parameters::const_iterator found = parameters_.find(parameter); 124 Parameters::const_iterator found = parameters_.find(parameter);
125 125
126 if (found == parameters_.end()) 126 if (found == parameters_.end())
127 { 127 {
128 LOG(ERROR) << "Inexistent parameter in a SQL query: " << parameter; 128 throw Orthanc::OrthancException(Orthanc::ErrorCode_InexistentItem,
129 throw Orthanc::OrthancException(Orthanc::ErrorCode_InexistentItem); 129 "Inexistent parameter in a SQL query: " + parameter);
130 } 130 }
131 else 131 else
132 { 132 {
133 return found->second; 133 return found->second;
134 } 134 }
140 { 140 {
141 Parameters::iterator found = parameters_.find(parameter); 141 Parameters::iterator found = parameters_.find(parameter);
142 142
143 if (found == parameters_.end()) 143 if (found == parameters_.end())
144 { 144 {
145 LOG(ERROR) << "Ignoring inexistent parameter in a SQL query: " << parameter; 145 throw Orthanc::OrthancException(Orthanc::ErrorCode_InexistentItem,
146 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 146 "Inexistent parameter in a SQL query: " + parameter);
147 } 147 }
148 else 148 else
149 { 149 {
150 found->second = type; 150 found->second = type;
151 } 151 }