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

Graceful fossil error handling #3951

Merged
merged 4 commits into from Jan 2, 2023
Merged

Graceful fossil error handling #3951

merged 4 commits into from Jan 2, 2023

Conversation

Oliveriver
Copy link
Contributor

@Oliveriver Oliveriver commented Dec 17, 2022

Brief Description of What This PR Does

Ignores corrupt fossil files to prevent crashes when opening the Thriveopedia.

I went for the nuclear option of just wrapping the whole loading process in a try-catch block and printing the error. That may lead to error spam if a user with a corrupt fossil repeatedly opens and closes the Thriveopedia.

Related Issues

Closes #3861

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@revolutionary-bot
Copy link

The lead programmer for Thrive is currently on break until 2023-01-02. Until then other programmers will try to make pull request reviews, but please be patient if your PR is not getting reviewed.

PRs maybe merged after multiple programmers have approved the changes (especially making sure to ensure style guide conformance and gameplay testing are good). But PRs may need to wait until the lead programmer is back from the break.

@hhyyrylainen hhyyrylainen added this to the Release 0.6.1 milestone Dec 18, 2022
@hhyyrylainen hhyyrylainen added this to In progress in Thrive Planning via automation Dec 18, 2022
@hhyyrylainen hhyyrylainen requested a review from a team December 18, 2022 08:15
Copy link
Member

@athariqk athariqk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still like the approach of allowing corrupt entries just for the sake of telling players they have corrupt fossils but, this is good enough I guess.

src/thriveopedia/fossilisation/FossilisedSpecies.cs Outdated Show resolved Hide resolved
@Oliveriver
Copy link
Contributor Author

I still like the approach of allowing corrupt entries just for the sake of telling players they have corrupt fossils but, this is good enough I guess.

It would certainly be possible to update that in future using a null check to display something else.

Copy link
Member

@athariqk athariqk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good, as for now, this looks fine to me

@hhyyrylainen hhyyrylainen merged commit 277d387 into master Jan 2, 2023
Thrive Planning automation moved this from In progress to Done Jan 2, 2023
@hhyyrylainen hhyyrylainen deleted the fossil_error_handling branch January 2, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Add graceful fossil error handling
4 participants