reportable_exception(string("libarchive error: ") + msg + ": " + string(archive_error_string(a) ?: "?")) {
inc_metric("error_count","libarchive",msg + ": " + string(archive_error_string(a) ?: "?"));
}
+ archive_exception(struct archive* a, const string& fname, const string& msg):
+ reportable_exception(string("libarchive error: ") + fname + string(" ") + msg + ": " +
+ string(archive_error_string(a) ?: "?")) {
+ inc_metric("error_count","libarchive",msg + ": " + string(archive_error_string(a) ?: "?"));
+ }
};
{
close (fd);
unlink (tmppath);
- throw archive_exception(a, "cannot extract file");
+ throw archive_exception(a, b_source0, "cannot extract file");
}
// Set the mtime so the fdcache file mtimes, even prefetched ones,
rc = archive_read_data_into_fd (a, fd);
if (rc != ARCHIVE_OK) {
close (fd);
- throw archive_exception(a, "cannot extract file");
+ throw archive_exception(a, rps, "cannot extract file");
}
// finally ... time to run elf_classify on this bad boy and update the database