diff --git a/src/main.cpp b/src/main.cpp index 8ce569a..71929f0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -158,12 +159,11 @@ int main(int argc, char *argv[]) } catch (const std::ifstream::failure &e) { - // std::ifstream seems to always return a generic error? LOG(lg, log::sev::error) - << translate("Probably permission denied.") << " (" - << e.what() << ')' + << std::strerror(errno) << format(translate(" (while opening {0:s})").str(), filepath); + return EXIT_FAILURE; } }