GZip: improve file open error message

This commit is contained in:
Matthias Schiffer 2019-12-14 22:19:34 +01:00
parent d9af9cbc9d
commit f0c08f78e0
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C

View file

@ -39,7 +39,10 @@ std::vector<uint8_t> readGZip(const char *filename) {
gzFile f = gzopen(filename, "rb");
if (!f)
throw std::system_error(errno, std::generic_category(), "unable to open GZip file");
throw std::system_error(
errno, std::generic_category(),
(std::string("unable to open file ") + filename).c_str()
);
while (true) {
if ((buffer.size() - len) < 4096)