add icon render test

This commit is contained in:
Konstantin Käfer
2014-07-15 18:08:14 -07:00
parent 7810548409
commit 682eaec87c
10 changed files with 72 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ void write_file(const std::string &filename, const std::string &data) {
fwrite(data.data(), sizeof(std::string::value_type), data.size(), fd);
fclose(fd);
} else {
fprintf(stderr, "Failed to open file\n");
throw std::runtime_error(std::string("Failed to open file ") + filename);
}
}
@@ -26,7 +26,7 @@ std::string read_file(const std::string &filename) {
data << file.rdbuf();
return data.str();
} else {
throw std::runtime_error("Cannot read file " + filename);
throw std::runtime_error(std::string("Cannot read file ") + filename);
}
}