From c99d4b19a9bce100eaa5c4d4486f1216b3335c02 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 23 Jan 2013 10:41:38 +0100 Subject: [PATCH] Throw exception for missing types. --- lib/config/configitem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 8690162f5..898ad53c1 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -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()); -- 2.40.0