From e27c94b51a2e315ed5f529ba0c8c0d1bf354143c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 24 Dec 2009 20:37:31 +0000 Subject: 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... --- src/buildparser.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 ) sFilename.push( sFile ); FILE *fIn = fopen( sFile.getStr(), "rt" ); + if( fIn == NULL ) + { + throw Bu::ExceptionBase("Cannot open file: %s", sFile.getStr() ); + } build_lex_init( &scanner ); // build_set_debug( true, scanner ); build_set_in( fIn, scanner ); -- cgit v1.2.3