From 5836b5b8683fe6afe7f260a7041f193fdd6a55b1 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 5 Jul 2016 15:40:49 +0200 Subject: [PATCH] Fix: include_recursive should gracefully handle inaccessible files fixes #12098 --- lib/config/configcompiler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index 7e76e9883..209b1bd9b 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -113,7 +113,14 @@ String ConfigCompiler::GetPackage(void) const void ConfigCompiler::CollectIncludes(std::vector& 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); + } } /**