modorganizer-basic_games icon indicating copy to clipboard operation
modorganizer-basic_games copied to clipboard

Fix parsing error if user file is broken

Open Jerome226 opened this issue 1 year ago • 4 comments
trafficstars

Catch errors if the EA user file is broken to avoid erroring at launch. Should fix the issue correctly.

Jerome226 avatar Aug 06 '24 07:08 Jerome226

@Holt59 You can delete the other PR I made. This is an actual fix. Sorry for any inconvenience.

Jerome226 avatar Aug 06 '24 07:08 Jerome226

This may prevent the error but it doesn't really resolve the issue since it will fail to parse any ea games by returning early.

Perhaps the better solution would be an error message that gives the user useful info and allows them to correct the issue. Assuming it's not still possible to grab the value from the file.

Silarn avatar Aug 07 '24 13:08 Silarn

This may prevent the error but it doesn't really resolve the issue since it will fail to parse any ea games by returning early.

Perhaps the better solution would be an error message that gives the user useful info and allows them to correct the issue.

image Like this?

Jerome226 avatar Aug 07 '24 20:08 Jerome226

This may prevent the error but it doesn't really resolve the issue since it will fail to parse any ea games by returning early.

Perhaps the better solution would be an error message that gives the user useful info and allows them to correct the issue. Assuming it's not still possible to grab the value from the file.

This only happen in rare case, this commit is simply to avoid a big error popup everytime. The fix it is to login into EA and launch the launcher. But the current error popup simply talks about python stuff and that doesn't really help the user at finding why their mod organizer is erroring everytime. Adding a simple print after the error catching would tell the user in the logs that the ini file can't be parsed like its done in other python files currently (like epic_utils.py).

Jerome226 avatar Aug 07 '24 20:08 Jerome226