@ -134,7 +134,11 @@ void ESMReader::getHExact(void*p, int size)
{
getSubHeader();
if (size != static_cast<int> (mCtx.leftSub))
fail("getHExact() size mismatch");
std::stringstream error;
error << "getHExact(): size mismatch (requested " << size << ", got " << mCtx.leftSub << ")";
fail(error.str());
}
getExact(p, size);
@ -137,7 +137,11 @@ public:
if (mCtx.leftSub != sizeof(X))
fail("getHT(): subrecord size mismatch");
error << "getHT(): subrecord size mismatch (requested " << sizeof(X) << ", got " << mCtx.leftSub << ")";
getT(x);