Mod Error Container – Compat with erroring mods
This mod reverts back the change on the latest repentance update that makes it so any error on any callback of any mod will ♥♥♥♥ all the mods that come after it…so, with this mod on, callbacks will function closer to how they did before that change, so an error on 1 mod wont ♥♥♥♥ the other mods as much.
ONLY ENABLE THIS MOD IF YOU ARE HELLBENT ON USING MODS THAT EVENTUALLY ERROR, ON ANY OTHER CASE LEAVE IT DISABLED.
THIS MOD WILL ALWAYS SHOW UP IN CRASH LOGS ALONGSIDE THE ACTUAL MOD THAT CRASHED, SO ONLY REPORT THE CRASHES HERE IF THIS IS THE ONLY MOD THAT SHOWS UP IN THE LOG’S CRASH REPORT NEAR THE END.
Alright I’ll use an example to make it easier to understand. On the current repentance patch, for example, if one mod does something when a tear is fired, and throws an error in the process, then that means no other mod that loads after it would be able to do anything when tears are fired. This mod changes it so, even if a mod errors, the mods that load after it would still run stuff for the fired tear.
– Errors no longer appear in red in the console, since theres no way for me to print red text there, they appear in white.
– On the log files, when a crash happens, the source of the crash will both display this mod and the actual mod that crashed, so make sure to look up for the actual mod error. If only this mod is displayed as the cause of a crash, let me know (it shouldnt happen)
– AddCallback errors will be falsely reported as erroring on this mod, so you should definitely disable this mod when doing mod dev.
– Errors from other mods should no longer ♥♥♥♥ up your mod, that means you can run old mods that work mostly fine but with some errors without the risk of them ♥♥♥♥♥♥♥ up newer ones….or at least not as often
– Errors will now display a code for the callback where the error happened (check the callbacks enum on the isaac docs for reference). The format for errors is "[modname:callbacktype] error message"
Because there are implications of this change being deliberate on various things that has been said, so it’s not guaranteed that it will be changed back to the way it was.
This mod will be unlisted and automatically disabled when/if the error handling change gets reverted, in the meantime this will exist as a temporary solution.
Special Thanks to DeadInfinity for some corrections on the code.
Revisions:
Old revisions of this mod are available below. Click the link to download.