mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Fix: include_recursive should gracefully handle inaccessible files
fixes #12098
This commit is contained in:
parent
9b873d60c2
commit
5836b5b868
@ -113,7 +113,14 @@ String ConfigCompiler::GetPackage(void) const
|
|||||||
void ConfigCompiler::CollectIncludes(std::vector<Expression *>& expressions,
|
void ConfigCompiler::CollectIncludes(std::vector<Expression *>& expressions,
|
||||||
const String& file, const String& zone, const String& package)
|
const String& file, const String& zone, const String& package)
|
||||||
{
|
{
|
||||||
expressions.push_back(CompileFile(file, zone, package));
|
try {
|
||||||
|
Expression *expr = CompileFile(file, zone, package);
|
||||||
|
expressions.push_back(expr);
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
Log(LogWarning, "ConfigCompiler")
|
||||||
|
<< "Cannot compile file '"
|
||||||
|
<< file << "': " << DiagnosticInformation(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user