error early when it can't read the style file

This commit is contained in:
Konstantin Käfer
2014-06-02 12:01:33 +02:00
parent 6bbac8559f
commit 15c12701e3

View File

@@ -44,6 +44,10 @@ int main(int argc, char *argv[]) {
// read default stylesheet from disk
std::ifstream stylefile("./style.min.js");
if (!stylefile.good()) {
fprintf(stder, "Cannot read style file\n");
return 1;
}
std::stringstream stylejson;
stylejson << stylefile.rdbuf();