From f0c08f78e0d996d674437b252d19746e263ed014 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 14 Dec 2019 22:19:34 +0100 Subject: [PATCH] GZip: improve file open error message --- src/GZip.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GZip.cpp b/src/GZip.cpp index 8a95c1e..0005923 100644 --- a/src/GZip.cpp +++ b/src/GZip.cpp @@ -39,7 +39,10 @@ std::vector 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)