mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
ce2735f10b
commit
1b21faeb5d
@ -89,6 +89,12 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void)
|
|||||||
BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
|
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;
|
std::vector<Expression *> exprs;
|
||||||
|
|
||||||
Array::Ptr templateArray = new Array();
|
Array::Ptr templateArray = new Array();
|
||||||
|
@ -141,13 +141,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
item->SetType(type);
|
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->SetName(name);
|
||||||
|
|
||||||
item->AddExpression(new OwnedExpression(expression));
|
item->AddExpression(new OwnedExpression(expression));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user