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

Fix exception propagation to JS for async void functions #161

Conversation

arekmula
Copy link
Contributor

Hey,

We encountered an issue where exceptions were not properly propagated for functions returning future<void>. It's because future was never resolved in the doResolve for void types and exception was never raised there so it could be caught and translated using djinni_native_exception_to_js

Copy link
Contributor

@li-feng-sc li-feng-sc left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you!

@li-feng-sc
Copy link
Contributor

The CI error is not from your PR. Should be fixed with #162 if you pull that from main

…result from future so the exception can be thrown, catched and translated
@arekmula arekmula force-pushed the fix/exceptions-propagation-from-async-void-functions branch from 4a34a19 to 4061704 Compare February 19, 2024 07:45
@arekmula arekmula requested a review from li-feng-sc February 19, 2024 07:46
@arekmula
Copy link
Contributor Author

arekmula commented Feb 19, 2024

I rebased on top of the current main branch

@li-feng-sc li-feng-sc merged commit f077e04 into Snapchat:main Feb 20, 2024
1 check passed
@arekmula arekmula deleted the fix/exceptions-propagation-from-async-void-functions branch February 20, 2024 07:26
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