mirror of https://github.com/Icinga/icinga2.git
Removed assert()s in ConfigItemBuilder::Compile.
This commit is contained in:
parent
0ca8012079
commit
6c0a6a2207
|
@ -82,8 +82,17 @@ void ConfigItemBuilder::AddExpressionList(const ExpressionList::Ptr& exprl)
|
|||
|
||||
ConfigItem::Ptr ConfigItemBuilder::Compile(void)
|
||||
{
|
||||
assert(!m_Type.IsEmpty());
|
||||
assert(!m_Name.IsEmpty());
|
||||
if (m_Type.IsEmpty()) {
|
||||
stringstream msgbuf;
|
||||
msgbuf << "The type name of an object may not be empty: " << m_DebugInfo;
|
||||
throw_exception(invalid_argument(msgbuf.str()));
|
||||
}
|
||||
|
||||
if (m_Name.IsEmpty()) {
|
||||
stringstream msgbuf;
|
||||
msgbuf << "The name of an object may not be empty: " << m_DebugInfo;
|
||||
throw_exception(invalid_argument(msgbuf.str()));
|
||||
}
|
||||
|
||||
ExpressionList::Ptr exprl = boost::make_shared<ExpressionList>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue