diff --git a/modules/db/src/paged_array.hh b/modules/db/src/paged_array.hh index 776754bc7cb37118cdd9bd11376b21862f49b8d5..3ce76378b9fe4209364fe77697822c43510da165 100644 --- a/modules/db/src/paged_array.hh +++ b/modules/db/src/paged_array.hh @@ -135,7 +135,10 @@ public: p.reserve(P); p.resize(left); in_stream.read(reinterpret_cast<char*>(&p.front()), - p.size()*sizeof(T)); + p.size()*sizeof(T)); + if(!in_stream.good()) { + throw ost::Error("Failed to read data!"); + } } } else { throw ost::Error("Cannot load non POD paged array!");