Skip to content
Snippets Groups Projects
Commit 9060d1ef authored by marco's avatar marco
Browse files

throw error when trying to insert already existing chain

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1764 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent eb12a497
No related branches found
No related tags found
No related merge requests found
......@@ -382,6 +382,11 @@ ResidueImplPtr EntityImpl::CreateResidue(const ChainImplPtr& cp,
ChainImplPtr EntityImpl::InsertChain(const String& cname)
{
ChainImplMap::iterator i=chain_map_.find(cname);
if (i!=chain_map_.end()) {
throw IntegrityError("Can't insert chain. A chain with name '"+cname+
"' already exists");
}
#if MAKE_SHARED_AVAILABLE
ChainImplPtr cp=boost::make_shared<ChainImpl>(shared_from_this(), cname);
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment