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

Catch exceptions from user callbacks early #796

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

paullouisageneau
Copy link
Owner

This PR introduces try catch blocks to ensure exceptions leaking from user callbacks are caught early, otherwise in some situations it could introduce undesired behavior changes like a second callback not called as it should.

@paullouisageneau paullouisageneau merged commit c91f0df into v0.18 Feb 1, 2023
@paullouisageneau paullouisageneau deleted the catch-user-cb-exceptions branch February 1, 2023 10:51
@themightyoarfish
Copy link

Would it be possible to install some kind of exception handler? I've been repeatedly bitten by my errors getting swallowed and it taking a while for me to remember that all exceptions in user callbacks get caught. Now I have to remember to enable logging and then crawl it during development.

@paullouisageneau
Copy link
Owner Author

@themightyoarfish I get the idea but do you really need a dedicated callback for that? Uncaught exceptions result in warnings that you can easily intercept in the log callback.

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