From 49d872fd86d8cd4a88c03b1e482a0cd4e9762daa Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sat, 7 Oct 2017 15:33:46 +0200 Subject: [PATCH] Slightly better error handling. --- src/Options.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Options.cpp b/src/Options.cpp index 8555bd3..d384ef8 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -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); } }