mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Add error message for missing imports (and possibly other errors)
fixes #7331
This commit is contained in:
parent
954debf235
commit
a08f4588eb
@ -268,7 +268,14 @@ void ConfigItem::ValidateItem(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctype->ValidateItem(GetSelf());
|
try {
|
||||||
|
ctype->ValidateItem(GetSelf());
|
||||||
|
} catch (const ConfigError& ex) {
|
||||||
|
const DebugInfo *di = boost::get_error_info<errinfo_debuginfo>(ex);
|
||||||
|
ConfigCompilerContext::GetInstance()->AddMessage(true, ex.what(), di ? *di : DebugInfo());
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
ConfigCompilerContext::GetInstance()->AddMessage(true, DiagnosticInformation(ex));
|
||||||
|
}
|
||||||
|
|
||||||
m_Validated = true;
|
m_Validated = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user