Fix: include_recursive should gracefully handle inaccessible files

fixes #12098
This commit is contained in:
Michael Friedrich 2016-07-05 15:40:49 +02:00
parent 9b873d60c2
commit 5836b5b868
1 changed files with 8 additions and 1 deletions

View File

@ -113,7 +113,14 @@ String ConfigCompiler::GetPackage(void) const
void ConfigCompiler::CollectIncludes(std::vector<Expression *>& expressions,
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);
}
}
/**