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

Add user-defined errors for render functions #196

Merged
merged 3 commits into from
Sep 4, 2021
Merged

Conversation

parasyte
Copy link
Owner

@parasyte parasyte commented Sep 4, 2021

This was so much easier than I thought it would be. Last time I tried this, it was a huge pain. This change was absolutely effortless! Worked first time. Even though there isn't much to it, and most upgrades will need to add a seemly useless Ok(()), this really is a game-changer for error handling inside custom render functions.

The error is simply bubbled to the outer caller, and the game loop can decide how it wants to handle these errors.

@parasyte parasyte merged commit db00a67 into master Sep 4, 2021
@parasyte parasyte deleted the user-defined-errors branch September 4, 2021 16:00
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

Successfully merging this pull request may close these issues.

Consider making the render function return Result<(), T>
1 participant