Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling in config file reader #118

Open
Nightinggale opened this issue May 13, 2019 · 1 comment
Open

Better error handling in config file reader #118

Nightinggale opened this issue May 13, 2019 · 1 comment

Comments

@Nightinggale
Copy link

Being in need of a config file reader, I found the one in SpeedControlConfig.cs.

It seems to work just fine, but I managed to crash the mod when not using the config file correctly. I expanded on the function to never crash and make it use default values in case it fails to read what it needs from the config file.

Here is the updated version. Feel free to use it if you like.

@javisar
Copy link
Owner

javisar commented May 15, 2019

Thank you for the tip. I didn't realize that malformed json could cause issues. To be honest this was a quick solution and I'm waiting until presumably Klei adds a built in mod config support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants