danmar / simplecpp

C++ preprocessor
BSD Zero Clause License
209 stars 83 forks source link

Do not assert when source file is missing #334

Closed danmar closed 9 months ago

danmar commented 9 months ago

Executing simplecpp with a missing file cause assertion error. We should report some file not found error instead:

daniel@laptop:~/simplecpp$ ./simplecpp notexist.cpp 
simplecpp: simplecpp.cpp:388: FileStream::FileStream(const string&): Assertion `file != nullptr' failed. 
Aborted (core dumped)