// remove a group and throw an Error if the specified group does not exist void Model::remove_group(std::tr1::shared_ptr<Component> component) { string name = component->get_name(); if (!is_group_present(name)) { throw Error("Group with this name does not exist"); } groups.erase(name); return; }