1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Throw exception on failed write

This commit is contained in:
elsid 2023-02-11 14:52:31 +01:00
parent 5f1da29881
commit 4f683d1ee9
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -169,7 +169,7 @@ namespace ESM
else
{
if (isSet() && !hasContentFile())
Log(Debug::Error) << "Generated RefNum can not be saved in 32bit format";
throw std::runtime_error("Generated RefNum can not be saved in 32bit format");
int refNum = (mIndex & 0xffffff) | ((hasContentFile() ? mContentFile : 0xff) << 24);
esm.writeHNT(tag, refNum, 4);
}