Slightly better error handling.

This commit is contained in:
2017-10-07 15:33:46 +02:00
parent ade49bdcc7
commit 49d872fd86

View File

@@ -1,4 +1,5 @@
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
@@ -26,7 +27,7 @@ Options:
static void check_file(const char * filename)
{
if (access(filename, R_OK) != 0) {
cerr << filename << " could not be read" << endl;
perror(filename);
exit(1);
}
}