spit an error when no config file is found, to avoid confusing lex and the user.
This commit is contained in:
parent
da0b76803d
commit
b3b0926fe1
1 changed files with 6 additions and 2 deletions
|
@ -54,9 +54,13 @@ void parser::parse(string rc_file)
|
||||||
|
|
||||||
yyin = fopen(rc_file.c_str(), "r");
|
yyin = fopen(rc_file.c_str(), "r");
|
||||||
|
|
||||||
|
if (yyin) {
|
||||||
yyparse(this);
|
yyparse(this);
|
||||||
|
|
||||||
fclose(yyin);
|
fclose(yyin);
|
||||||
|
} else {
|
||||||
|
std::cerr << "ERROR: Configuration file could not be opened/found.\n";
|
||||||
|
}
|
||||||
|
|
||||||
_kt->reset();
|
_kt->reset();
|
||||||
_kt->initialize();
|
_kt->initialize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue