mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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());
|
||||
|
||||
if (!dtype)
|
||||
throw_exception(runtime_error("Type '" + GetType() + "' does not exist."));
|
||||
|
||||
if (!dobj)
|
||||
dobj = dtype->GetObject(GetName());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user