summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-21 22:59:19 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-21 22:59:19 +0100
commit92984df6ab50ba4ec90d105e44b58efa863c4b59 (patch)
tree492b129885467a20078af519da9864c7d2319c0a /src/lib/util.cc
parentf868d7b9828766aab128f19ec8536efcac36ae37 (diff)
Even better open-file error reports.
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 6a1f2b284..e497ecf3c 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(), errno);
+ throw OpenFileError (files[i].string(), errno, true);
}
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(), errno);
+ throw OpenFileError (files[i].string(), errno, true);
}
boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i]));