mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 21:24:41 +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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user