diff --git a/src/core/Cfg.cpp b/src/core/Cfg.cpp index a205422..99a93a7 100644 --- a/src/core/Cfg.cpp +++ b/src/core/Cfg.cpp @@ -174,6 +174,8 @@ std::vector Cfg::getNext() unsigned int Cfg::getID() { XMLAttribute* attr = _elem->getAttribute("id"); - assert(attr != NULL); + if (attr == NULL) { + THROWEXCEPTION("Error: Configuration Element '%s' does not have an 'id' field. 'id' is required!", _elem->getName().c_str()); + } return atoi(attr->getValue().c_str()); }