spit an error when no config file is found, to avoid confusing lex and the user.
Marius Nita marius@cs.pdx.edu
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
util/epist/parser.cc
→
util/epist/parser.cc
@@ -54,9 +54,13 @@ extern FILE *yyin;
yyin = fopen(rc_file.c_str(), "r"); - yyparse(this); + if (yyin) { + yyparse(this); + fclose(yyin); + } else { + std::cerr << "ERROR: Configuration file could not be opened/found.\n"; + } - fclose(yyin); _kt->reset(); _kt->initialize(); }