Added a check for an empty initializor

This commit is contained in:
maartenkeijzer 2001-06-11 12:37:21 +00:00
commit 49434ecc03

View file

@ -89,7 +89,12 @@ class eoGpDepthInitializer : public eoInit< eoParseTree<FType, Node> >
max_depth(_max_depth),
initializor(_initializor),
grow(_grow)
{}
{
if(initializor.empty())
{
throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?");
}
}
virtual string className() const { return "eoDepthInitializer"; };