Mercurial > hg > orthanc
comparison OrthancServer/FromDcmtkBridge.cpp @ 2116:2fabd1073728
prevent registering two tags with the same symbolic name
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 31 Oct 2016 15:42:18 +0100 |
parents | a657f7772e69 |
children | b9bd52c72ba2 |
comparison
equal
deleted
inserted
replaced
2115:a657f7772e69 | 2116:2fabd1073728 |
---|---|
315 entry->setGroupRangeRestriction(DcmDictRange_Unspecified); | 315 entry->setGroupRangeRestriction(DcmDictRange_Unspecified); |
316 entry->setElementRangeRestriction(DcmDictRange_Unspecified); | 316 entry->setElementRangeRestriction(DcmDictRange_Unspecified); |
317 | 317 |
318 { | 318 { |
319 DictionaryLocker locker; | 319 DictionaryLocker locker; |
320 | |
321 if (locker->findEntry(name.c_str())) | |
322 { | |
323 LOG(ERROR) << "Cannot register two tags with the same symbolic name \"" << name << "\""; | |
324 throw OrthancException(ErrorCode_AlreadyExistingTag); | |
325 } | |
326 | |
320 locker->addEntry(entry.release()); | 327 locker->addEntry(entry.release()); |
321 } | 328 } |
322 } | 329 } |
323 | 330 |
324 | 331 |