comparison OrthancServer/ServerToolbox.cpp @ 2955:bbfd95a0c429

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:59:23 +0100
parents 65b20d922e10
children 5da6d1063d8f 4e43e67f8ecf
comparison
equal deleted inserted replaced
2954:d924f9bb61cc 2955:bbfd95a0c429
300 300
301 if (!database.LookupResource(resource, tmp, *it) || 301 if (!database.LookupResource(resource, tmp, *it) ||
302 tmp != level || 302 tmp != level ||
303 !FindOneChildInstance(instance, database, resource, level)) 303 !FindOneChildInstance(instance, database, resource, level))
304 { 304 {
305 LOG(ERROR) << "Cannot find an instance for " << EnumerationToString(level) 305 throw OrthancException(ErrorCode_InternalError,
306 << " with identifier " << *it; 306 "Cannot find an instance for " +
307 throw OrthancException(ErrorCode_InternalError); 307 std::string(EnumerationToString(level)) +
308 " with identifier " + *it);
308 } 309 }
309 310
310 // Get the DICOM file attached to some instances in the resource 311 // Get the DICOM file attached to some instances in the resource
311 FileInfo attachment; 312 FileInfo attachment;
312 if (!database.LookupAttachment(attachment, instance, FileContentType_Dicom)) 313 if (!database.LookupAttachment(attachment, instance, FileContentType_Dicom))
313 { 314 {
314 LOG(ERROR) << "Cannot retrieve the DICOM file associated with instance " << database.GetPublicId(instance); 315 throw OrthancException(ErrorCode_InternalError,
315 throw OrthancException(ErrorCode_InternalError); 316 "Cannot retrieve the DICOM file associated with instance " +
317 database.GetPublicId(instance));
316 } 318 }
317 319
318 try 320 try
319 { 321 {
320 // Read and parse the content of the DICOM file 322 // Read and parse the content of the DICOM file