summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-18 17:02:33 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-18 17:02:33 +0100
commit513947df0f421c086ac56dff48dfe540b0a380c2 (patch)
tree5fd393d3833a512dffacbeb2bb11eafe4003440e /src/lib/util.cc
parent6c16feca6c9b51b4833051eff4b5f6a9e9454a73 (diff)
Better errors on open fails; remove unused exception.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 704d4aa9d..6a1f2b284 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -422,7 +422,7 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size)
while (i < int64_t (files.size()) && to_do > 0) {
FILE* f = fopen_boost (files[i], "rb");
if (!f) {
- throw OpenFileError (files[i].string());
+ throw OpenFileError (files[i].string(), errno);
}
boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i]));
@@ -442,7 +442,7 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size)
while (i >= 0 && to_do > 0) {
FILE* f = fopen_boost (files[i], "rb");
if (!f) {
- throw OpenFileError (files[i].string());
+ throw OpenFileError (files[i].string(), errno);
}
boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i]));