Error catching?
Error catching?
I'm currently working on an all-GUI mod, and I would love it if any errors that it produces would not crash the save. For development, crashing is fine of course, but when other people use my mod, I would feel better if they wouldn't lose unsaved progess on their game because of some error on my part. So is it possible to catch those errors and prevent a save-crash? I would guess not, but if it does (or you know of any workaround), I would be grateful to know. Thanks!
Re: Error catching?
You don't want to ever catch an error unless it's something outside of your control (parsing user input for example).
Catching errors in your logic just means you'll never hear about it being broken. If you have it crash-to-main-menu people are far more likely to tell you if they ever have an error and then you can fix it.
That's one of the core principles of Factorio development and why the game is as stable as it is: we don't silently swallow errors - we be as loud as possible so we always know when one happens and we can fix it.
Subsequently: there are very *very* few bugs left in the game. Anything we know about we fix.
Catching errors in your logic just means you'll never hear about it being broken. If you have it crash-to-main-menu people are far more likely to tell you if they ever have an error and then you can fix it.
That's one of the core principles of Factorio development and why the game is as stable as it is: we don't silently swallow errors - we be as loud as possible so we always know when one happens and we can fix it.
Subsequently: there are very *very* few bugs left in the game. Anything we know about we fix.
If you want to get ahold of me I'm almost always on Discord.
Re: Error catching?
Hm I guess that is a sensible apporach, I haven't thought about it in that way. I was just a bit worried to destroy some users progress because my mod sucks, but I guess more testing will be the right solution in general. Thanks for the reply!Rseding91 wrote: Wed Jan 23, 2019 10:45 pm You don't want to ever catch an error unless it's something outside of your control (parsing user input for example).
Catching errors in your logic just means you'll never hear about it being broken. If you have it crash-to-main-menu people are far more likely to tell you if they ever have an error and then you can fix it.
That's one of the core principles of Factorio development and why the game is as stable as it is: we don't silently swallow errors - we be as loud as possible so we always know when one happens and we can fix it.
Subsequently: there are very *very* few bugs left in the game. Anything we know about we fix.

