Page 1 of 1

SaveLoadManager could use some try/catch blocks

Posted: Fri Aug 12, 2022 1:52 pm
by DunnyOfPenwick
I got a user bug report for my mod.
The mod save data had somehow got corrupted (filled with null values) and when they tried to load the game they were stuck looking at a black screen.

I think some try/catch blocks should be added to both Serialization and Deserialization calls in the SaveLoadManager.
At the very least the user should be informed there was a problem during save/load.
If it occurred for a particular mod they should be told which mod it was.

Re: SaveLoadManager could use some try/catch blocks

Posted: Sun Aug 14, 2022 10:16 pm
by Interkarma
I've recently added exception handling when failing to load world variant data, which seems to be a common point of failure. I'll add something similar for mods, including an informational message for player about which mod's data failed to save/load.