comparison OrthancServer/DicomModification.cpp @ 916:b4b46e3e6017

more explicit error message
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Jun 2014 14:40:28 +0200
parents 84513f2ee1f3
children 2f76b92addd4
comparison
equal deleted inserted replaced
915:703bef350e89 916:b4b46e3e6017
35 35
36 #include "../Core/OrthancException.h" 36 #include "../Core/OrthancException.h"
37 #include "FromDcmtkBridge.h" 37 #include "FromDcmtkBridge.h"
38 38
39 #include <memory> // For std::auto_ptr 39 #include <memory> // For std::auto_ptr
40 #include <glog/logging.h>
40 41
41 namespace Orthanc 42 namespace Orthanc
42 { 43 {
43 void DicomModification::MapDicomIdentifier(ParsedDicomFile& dicom, 44 void DicomModification::MapDicomIdentifier(ParsedDicomFile& dicom,
44 ResourceType level) 45 ResourceType level)
236 throw OrthancException(ErrorCode_BadRequest); 237 throw OrthancException(ErrorCode_BadRequest);
237 } 238 }
238 239
239 if (level_ == ResourceType_Patient && !IsReplaced(DICOM_TAG_PATIENT_ID)) 240 if (level_ == ResourceType_Patient && !IsReplaced(DICOM_TAG_PATIENT_ID))
240 { 241 {
242 LOG(ERROR) << "When modifying a patient, her PatientID is required to be modified";
241 throw OrthancException(ErrorCode_BadRequest); 243 throw OrthancException(ErrorCode_BadRequest);
242 } 244 }
243 245
244 if (level_ > ResourceType_Patient && IsReplaced(DICOM_TAG_PATIENT_ID)) 246 if (level_ > ResourceType_Patient && IsReplaced(DICOM_TAG_PATIENT_ID))
245 { 247 {