projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da0b768
)
spit an error when no config file is found, to avoid confusing lex and the user.
author
Marius Nita
<marius@cs.pdx.edu>
Mon, 14 Oct 2002 12:54:46 +0000
(12:54 +0000)
committer
Marius Nita
<marius@cs.pdx.edu>
Mon, 14 Oct 2002 12:54:46 +0000
(12:54 +0000)
util/epist/parser.cc
patch
|
blob
|
history
diff --git
a/util/epist/parser.cc
b/util/epist/parser.cc
index
5c953aa
..
f6ed589
100644
(file)
--- a/
util/epist/parser.cc
+++ b/
util/epist/parser.cc
@@
-54,9
+54,13
@@
void parser::parse(string rc_file)
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();
}