better handling of comments

This commit is contained in:
Vaclav Tvrdik
2021-03-07 18:40:26 +01:00
parent 1c7dea823b
commit 3d54ed9fb3
4 changed files with 22 additions and 16 deletions

View File

@@ -10,7 +10,7 @@ std::string read_file_contents(const std::string &filename) {
std::ifstream f;
f.open(filename.c_str());
if (!f)
throw std::runtime_error("could not open file");
throw std::runtime_error("could not open file (" + filename + ")");
f.seekg(0, std::ios::end);
std::string contents;