mirror of https://github.com/Icinga/icinga2.git
Throw exception for missing types.
This commit is contained in:
parent
65c0334b28
commit
c99d4b19a9
|
@ -150,6 +150,9 @@ DynamicObject::Ptr ConfigItem::Commit(void)
|
||||||
|
|
||||||
DynamicType::Ptr dtype = DynamicType::GetByName(GetType());
|
DynamicType::Ptr dtype = DynamicType::GetByName(GetType());
|
||||||
|
|
||||||
|
if (!dtype)
|
||||||
|
throw_exception(runtime_error("Type '" + GetType() + "' does not exist."));
|
||||||
|
|
||||||
if (!dobj)
|
if (!dobj)
|
||||||
dobj = dtype->GetObject(GetName());
|
dobj = dtype->GetObject(GetName());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue