diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-24 20:37:31 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-24 20:37:31 +0000 |
commit | e27c94b51a2e315ed5f529ba0c8c0d1bf354143c (patch) | |
tree | 5e9298a1a39eb315c89adf8068bfbcd91b261aaf /src/buildparser.cpp | |
parent | b87c8d2eb4f0c7fb25cee10e8fdb2c8331343f8c (diff) | |
download | build-e27c94b51a2e315ed5f529ba0c8c0d1bf354143c.tar.gz build-e27c94b51a2e315ed5f529ba0c8c0d1bf354143c.tar.bz2 build-e27c94b51a2e315ed5f529ba0c8c0d1bf354143c.tar.xz build-e27c94b51a2e315ed5f529ba0c8c0d1bf354143c.zip |
Fixed the blocking-forever-when-no-file-exists issue, now it reports an error.
Haven't figured out why build can't build build anymore though, still have to
track that one down...
Diffstat (limited to 'src/buildparser.cpp')
-rw-r--r-- | src/buildparser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buildparser.cpp b/src/buildparser.cpp index e391523..125a31e 100644 --- a/src/buildparser.cpp +++ b/src/buildparser.cpp | |||
@@ -23,6 +23,10 @@ void BuildParser::load( const Bu::FString &sFile ) | |||
23 | 23 | ||
24 | sFilename.push( sFile ); | 24 | sFilename.push( sFile ); |
25 | FILE *fIn = fopen( sFile.getStr(), "rt" ); | 25 | FILE *fIn = fopen( sFile.getStr(), "rt" ); |
26 | if( fIn == NULL ) | ||
27 | { | ||
28 | throw Bu::ExceptionBase("Cannot open file: %s", sFile.getStr() ); | ||
29 | } | ||
26 | build_lex_init( &scanner ); | 30 | build_lex_init( &scanner ); |
27 | // build_set_debug( true, scanner ); | 31 | // build_set_debug( true, scanner ); |
28 | build_set_in( fIn, scanner ); | 32 | build_set_in( fIn, scanner ); |