summaryrefslogtreecommitdiff
path: root/src/archive/ZWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive/ZWrapper.cpp')
-rw-r--r--src/archive/ZWrapper.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/archive/ZWrapper.cpp b/src/archive/ZWrapper.cpp
index 330d35e..480dafc 100644
--- a/src/archive/ZWrapper.cpp
+++ b/src/archive/ZWrapper.cpp
@@ -34,7 +34,13 @@ bool ZWrapper::AddFile(const std::string& path, std::vector<char> data) {
stream.close();
}
- this->mZip->writebytes(path, data);
+ try {
+ this->mZip->writebytes(path, data);
+ } catch (const std::exception& e) {
+ // miniz's own error says nothing useful, so log which entry blew up and how big.
+ SPDLOG_ERROR("[ZWrapper] Failed to add '{}' ({} bytes): {}", path, fileSize, e.what());
+ throw;
+ }
return true;
}