Commit 078bf8a5 by Maarten L. Hekkelman

stricter code

parent 1f314a5e
......@@ -670,9 +670,13 @@ void category::set_validator(const validator *v, datablock &db)
if (missing.empty())
m_index = new category_index(this);
else if (VERBOSE > 0)
std::cerr << "Cannot construct index since the key field" << (missing.size() > 1 ? "s" : "") << " "
<< cif::join(missing, ", ") + " in " + m_name + " " + (missing.size() == 1 ? "is" : "are") << " missing" << std::endl;
else
{
std::ostringstream msg;
msg << "Cannot construct index since the key field" << (missing.size() > 1 ? "s" : "") << " "
<< cif::join(missing, ", ") << " in " << m_name << " " << (missing.size() == 1 ? "is" : "are") << " missing" << std::endl;
throw std::runtime_error(msg.str());
}
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment