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

Catch + log any load/save errors in OptionsManager #1345

Merged
merged 3 commits into from
Feb 2, 2022

Conversation

originalfoo
Copy link
Member

Wrap contents of the load/save data methods in try...catch blocks, logging any errors that may occur so at least we can find out where it went wrong.

When saving, I've set it to return the save byte arrray as that way we should be able to salvage most of the options (assuming the most common issue will be forgetting to update the size of the array when new options are added). Not sure if this is good or bad idea, lmk in comments.

@originalfoo originalfoo added the technical Tasks that need to be performed in order to improve quality and maintainability label Feb 1, 2022
@originalfoo originalfoo added this to the 11.6.4-hotfix-5 milestone Feb 1, 2022
@originalfoo originalfoo self-assigned this Feb 1, 2022
@originalfoo originalfoo added high priority Affects lots of users Settings Road config, mod options, config xml labels Feb 2, 2022
originalfoo added a commit that referenced this pull request Feb 2, 2022
This release makes some refinements to error checking/logging, and refines the pathfinder edition check/warning.

- [Meta] TM:PE 11.6.4-hotfix-5
- [Meta] Updates to error checking/logging, and refine pathfinder edition checks
- [Updated] Catch and log errors in savegame options save/load #1345 (aubergine18)
- [Updated] Pathfinder edition check refinements #1347 (aubergine18)
- [Updated] Reduce severity of some normal log messages #1348 #1350 (aubergine18)
@krzychu124 krzychu124 merged commit 74970cc into master Feb 2, 2022
@krzychu124 krzychu124 deleted the catch-options-errors branch February 2, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Affects lots of users Settings Road config, mod options, config xml technical Tasks that need to be performed in order to improve quality and maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants