Skip to content
Snippets Groups Projects
Commit 97b1cf6f authored by Studer Gabriel's avatar Studer Gabriel
Browse files

throw some error

parent 2700bfb3
Branches
Tags
No related merge requests found
......@@ -427,6 +427,12 @@ BlockModifierPtr Forcefield::GetBlockModifier(const String& modifier_name) const
String Forcefield::GetAtomType(const String& res_name, const String& atom_name) const{
BuildingBlockPtr block = this->GetBuildingBlock(res_name);
if(!block){
std::stringstream ss;
ss << "There is no building block for " << res_name;
ss << "in the forcefield!";
throw ost::Error(ss.str());
}
return block->GetType(atom_name);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment