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

Handle path verifications error when loading mod logo #1225

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

HenryLoenwind
Copy link
Contributor

instead of letting it bubble up to crash the game.

Fixes #1224

instead of letting it bubble up to crash the game
@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@Shadows-of-Fire
Copy link
Contributor

Is there the potential for any other kind of exception to be thrown here? Wondering if we should just expand it to Exception and be done with it.

@Shadows-of-Fire Shadows-of-Fire added bug A bug or error 1.21 Targeted at Minecraft 1.21 labels Jul 4, 2024
@HenryLoenwind
Copy link
Contributor Author

Is there the potential for any other kind of exception to be thrown here? Wondering if we should just expand it to Exception and be done with it.

I didn't dig for very long, but nothing stood out to me. I generally don't like blanket catches, as it's too easy for them to hide real issues. Better only cover all known exceptions and treat everything else as a bug that needs to be reported to be fixed by default.

Even for this one, one could argue we should check the data so the exception doesn't happen instead of catching it. And at work, I'd be one of those people.

@sciwhiz12
Copy link
Member

I'm leaning towards the same thought there: rethrow the exception with a better message rather than hiding an invalid path.

However, that validation should be done by FML on mod loading rather than the mod list screen.

@sciwhiz12 sciwhiz12 merged commit b1ffaf3 into neoforged:1.21.x Jul 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21 Targeted at Minecraft 1.21 bug A bug or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid path file for the logo crash the game
3 participants