mirror of https://github.com/Icinga/icinga2.git
parent
ce2735f10b
commit
1b21faeb5d
|
@ -89,6 +89,12 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void)
|
|||
BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
|
||||
}
|
||||
|
||||
if (m_Name.FindFirstOf("!") != String::NPos) {
|
||||
std::ostringstream msgbuf;
|
||||
msgbuf << "Name for object '" << m_Name << "' of type '" << m_Type << "' is invalid: Object names may not contain '!'";
|
||||
BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), m_DebugInfo));
|
||||
}
|
||||
|
||||
std::vector<Expression *> exprs;
|
||||
|
||||
Array::Ptr templateArray = new Array();
|
||||
|
|
|
@ -141,13 +141,6 @@ public:
|
|||
}
|
||||
|
||||
item->SetType(type);
|
||||
|
||||
if (name.FindFirstOf("!") != String::NPos) {
|
||||
std::ostringstream msgbuf;
|
||||
msgbuf << "Name for object '" << name << "' of type '" << type << "' is invalid: Object names may not contain '!'";
|
||||
BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), debugInfo));
|
||||
}
|
||||
|
||||
item->SetName(name);
|
||||
|
||||
item->AddExpression(new OwnedExpression(expression));
|
||||
|
|
Loading…
Reference in New Issue