Added missing error message when input file does not exist.

This commit is contained in:
2017-06-01 03:29:09 +02:00
parent 0930e062c4
commit cdcee897ec
3 changed files with 9 additions and 2 deletions

View File

@@ -27,6 +27,9 @@ void translate(const std::vector<std::string> &fileNames, Context &context)
{
std::ifstream file(fileName, std::ios::in);
if (!file.is_open())
throw LogicException("could not read file “" + fileName + "");
translate(fileName.c_str(), file, context);
}
}