comparison OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 1616:644c32c07306

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Sep 2015 16:00:50 +0200
parents bd1889029cbb
children 48224db51ee7
comparison
equal deleted inserted replaced
1615:c40fe92a68e7 1616:644c32c07306
576 dicom->Replace(DICOM_TAG_IMAGE_INDEX, boost::lexical_cast<std::string>(i + 1)); 576 dicom->Replace(DICOM_TAG_IMAGE_INDEX, boost::lexical_cast<std::string>(i + 1));
577 577
578 StoreCreatedInstance(someInstance, call, *dicom); 578 StoreCreatedInstance(someInstance, call, *dicom);
579 } 579 }
580 } 580 }
581 catch (OrthancException& e) 581 catch (OrthancException&)
582 { 582 {
583 // Error: Remove the newly-created series 583 // Error: Remove the newly-created series
584 584
585 std::string series; 585 std::string series;
586 if (context.GetIndex().LookupParent(series, someInstance)) 586 if (context.GetIndex().LookupParent(series, someInstance))
587 { 587 {
588 Json::Value dummy; 588 Json::Value dummy;
589 context.GetIndex().DeleteResource(dummy, series, ResourceType_Series); 589 context.GetIndex().DeleteResource(dummy, series, ResourceType_Series);
590 } 590 }
591 591
592 throw e; 592 throw;
593 } 593 }
594 594
595 std::string series; 595 std::string series;
596 if (context.GetIndex().LookupParent(series, someInstance)) 596 if (context.GetIndex().LookupParent(series, someInstance))
597 { 597 {
713 parent = tmp; 713 parent = tmp;
714 type = GetParentResourceType(type); 714 type = GetParentResourceType(type);
715 } 715 }
716 716
717 for (ModuleTags::const_iterator it = moduleTags.begin(); 717 for (ModuleTags::const_iterator it = moduleTags.begin();
718 it != moduleTags.end(); it++) 718 it != moduleTags.end(); ++it)
719 { 719 {
720 std::string t = it->Format(); 720 std::string t = it->Format();
721 if (siblingTags.isMember(t)) 721 if (siblingTags.isMember(t))
722 { 722 {
723 const Json::Value& tag = siblingTags[t]; 723 const Json::Value& tag = siblingTags[t];
784 } 784 }
785 } 785 }
786 else 786 else
787 { 787 {
788 throw OrthancException(ErrorCode_CreateDicomUseDataUriScheme); 788 throw OrthancException(ErrorCode_CreateDicomUseDataUriScheme);
789 return;
790 } 789 }
791 } 790 }
792 791
793 std::string id; 792 std::string id;
794 StoreCreatedInstance(id, call, dicom); 793 StoreCreatedInstance(id, call, dicom);