diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index c1b02a5e7..2dc9ae0c6 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -360,6 +360,9 @@ bool ConfigItem::CommitNewItems(WorkQueue& upq) } upq.Join(); + + if (upq.HasExceptions()) + return false; } } while (!items.empty()); diff --git a/lib/icinga/dependency.cpp b/lib/icinga/dependency.cpp index 59aa76d5b..214b16dfb 100644 --- a/lib/icinga/dependency.cpp +++ b/lib/icinga/dependency.cpp @@ -77,7 +77,7 @@ void Dependency::OnAllConfigLoaded(void) } if (!m_Child) - BOOST_THROW_EXCEPTION(ScriptError("Dependency '" << GetName() << "' references a child host/service which doesn't exist.", GetDebugInfo())); + BOOST_THROW_EXCEPTION(ScriptError("Dependency '" + GetName() + "' references a child host/service which doesn't exist.", GetDebugInfo())); m_Child->AddDependency(this); @@ -96,7 +96,7 @@ void Dependency::OnAllConfigLoaded(void) } if (!m_Parent) - BOOST_THROW_EXCEPTION(ScriptError("Dependency '" << GetName() << "' references a parent host/service which doesn't exist.", GetDebugInfo())); + BOOST_THROW_EXCEPTION(ScriptError("Dependency '" + GetName() + "' references a parent host/service which doesn't exist.", GetDebugInfo())); m_Parent->AddReverseDependency(this); }