mirror of https://github.com/Icinga/icinga2.git
parent
c44701068f
commit
25c490ecb6
|
@ -113,6 +113,8 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full
|
|||
|
||||
if (!ConfigItem::CommitItems(upq) || !ConfigItem::ActivateItems(upq, false, true)) {
|
||||
if (errors) {
|
||||
unlink(path.CStr());
|
||||
|
||||
BOOST_FOREACH(const boost::exception_ptr& ex, upq.GetExceptions()) {
|
||||
errors->Add(DiagnosticInformation(ex));
|
||||
}
|
||||
|
@ -123,6 +125,8 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full
|
|||
} catch (const std::exception& ex) {
|
||||
delete expr;
|
||||
|
||||
unlink(path.CStr());
|
||||
|
||||
if (errors)
|
||||
errors->Add(DiagnosticInformation(ex));
|
||||
|
||||
|
|
Loading…
Reference in New Issue