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 <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <future>
|
#include <future>
|
||||||
|
@ -158,12 +159,11 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
catch (const std::ifstream::failure &e)
|
catch (const std::ifstream::failure &e)
|
||||||
{
|
{
|
||||||
// std::ifstream seems to always return a generic error?
|
|
||||||
LOG(lg, log::sev::error)
|
LOG(lg, log::sev::error)
|
||||||
<< translate("Probably permission denied.") << " ("
|
<< std::strerror(errno)
|
||||||
<< e.what() << ')'
|
|
||||||
<< format(translate(" (while opening {0:s})").str(),
|
<< format(translate(" (while opening {0:s})").str(),
|
||||||
filepath);
|
filepath);
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user