diff --git a/dyn/configcompiler.cpp b/dyn/configcompiler.cpp index ca572cb6c..e94de6301 100644 --- a/dyn/configcompiler.cpp +++ b/dyn/configcompiler.cpp @@ -70,6 +70,9 @@ vector ConfigCompiler::CompileFile(const string& filename) stream.exceptions(ifstream::badbit); stream.open(filename.c_str(), ifstream::in); + if (!stream.good()) + throw invalid_argument("Could not open config file: " + filename); + Application::Log(LogInformation, "dyn", "Compiling config file: " + filename); return CompileStream(&stream);