Skip to content

[resource loader] don't swallow errors thrown in resource reload event listeners - #76

Merged
SpaceWalkerRS merged 1 commit into
OrnitheMC:gen2from
rhysdh540:gen2
Sep 7, 2026
Merged

[resource loader] don't swallow errors thrown in resource reload event listeners#76
SpaceWalkerRS merged 1 commit into
OrnitheMC:gen2from
rhysdh540:gen2

Conversation

@rhysdh540

Copy link
Copy Markdown
Contributor

this caused me some pain while debugging

@SpaceWalkerRS

Copy link
Copy Markdown
Member

I would prefer (and intended) for exceptions to be re-thrown rather than just logged. I'm 99% certain exceptions thrown during the RESOURCE_RELOAD_START event are already re-thrown as that's handled in SimpleResourceReload, and it's just the RESOURCE_RELOAD_END event that's the issue.

I reckon the best course of action is to pass a finalTask to the resource reload in addition to the initialTask. That way it can easily be extended and the resource reload will take care of making sure it's run at the end and on the reload thread (which ig right now is not a certainty).

Let me know if you're up for that, otherwise I'll have a go at it.

@SpaceWalkerRS
SpaceWalkerRS merged commit 979b57a into OrnitheMC:gen2 Sep 7, 2026
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.

2 participants