mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
e03e143177
commit
ee5f4fb7e3
@ -482,6 +482,9 @@ Value ImportExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
String type = VMOps::GetField(frame.Self, "type", m_DebugInfo);
|
||||
Value name = m_Name->Evaluate(frame);
|
||||
|
||||
if (!name.IsString())
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Template/object name must be a string", m_DebugInfo));
|
||||
|
||||
ConfigItem::Ptr item = ConfigItem::GetObject(type, name);
|
||||
|
||||
if (!item)
|
||||
|
Loading…
x
Reference in New Issue
Block a user