Fix file error reporting.
Not sure why exceptions don't have that info… 🤷
This commit is contained in:
parent
80e2e9d05d
commit
1fee4f5afd
|
@ -32,6 +32,7 @@
|
|||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <future>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user