comparison Core/HttpServer/HttpContentNegociation.cpp @ 2954:d924f9bb61cc

taking advantage of details in OrthancException
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:35:34 +0100
parents 878b59270859
children 4e43e67f8ecf
comparison
equal deleted inserted replaced
2953:210d5afd8f2b 2954:d924f9bb61cc
157 { 157 {
158 return quality; 158 return quality;
159 } 159 }
160 else 160 else
161 { 161 {
162 LOG(ERROR) << "Quality parameter out of range in a HTTP request (must be between 0 and 1): " << value; 162 throw OrthancException(
163 throw OrthancException(ErrorCode_BadRequest); 163 ErrorCode_BadRequest,
164 "Quality parameter out of range in a HTTP request (must be between 0 and 1): " + value);
164 } 165 }
165 } 166 }
166 } 167 }
167 168
168 return 1.0f; // Default quality 169 return 1.0f; // Default quality