diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /libs/regex/src/fileiter.cpp | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/regex/src/fileiter.cpp')
-rw-r--r-- | libs/regex/src/fileiter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/regex/src/fileiter.cpp b/libs/regex/src/fileiter.cpp index 780a12f16..5f65127ff 100644 --- a/libs/regex/src/fileiter.cpp +++ b/libs/regex/src/fileiter.cpp @@ -267,14 +267,15 @@ void mapfile::lock(pointer* node)const read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile); else read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile); -#ifndef BOOST_NO_EXCEPTIONS if((read_size == 0) || (std::ferror(hfile))) { +#ifndef BOOST_NO_EXCEPTIONS + unlock(node); throw std::runtime_error("Unable to read file."); - } #else - BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0)); + BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0)); #endif + } } else { |