Allow specifying location of colors.txt file

This commit is contained in:
sfan5
2016-08-09 16:45:39 +02:00
parent ab167d1c68
commit 73dab34d7c
2 changed files with 25 additions and 23 deletions

View File

@ -230,9 +230,8 @@ void TileGenerator::parseColorsFile(const std::string &fileName)
{
ifstream in;
in.open(fileName.c_str(), ifstream::in);
if (!in.is_open()) {
return;
}
if (!in.is_open())
throw std::runtime_error("Specified colors file could not be found.");
parseColorsStream(in);
}