Closed ryobg closed 6 years ago
The best way would be to replace assertion and throw some boost archive exception. instead. The archive is corrupted and there is nothing that can be done
Yes, it may do. Not sure how exceptions are handled in that moment, but looking by your answer it should be fine.
The exception will be handled in the domain master. The cons is that the Skyrim won't crash and users will not know that JC data was not loaded (unless they read log files)
Then maybe a combo of BOOST_ASSERT_MSG
and throw would do.
An assert to trigger when loading invalid triggers: https://github.com/ryobg/JContainers/blob/5ae10d81e1bb3ea062c6cd9716d79bb41fca0b1f/src/JContainers/src/collections/collections.cpp#L76