Skip to content

Commit

Permalink
Merge pull request #161 from arekmula/fix/exceptions-propagation-from…
Browse files Browse the repository at this point in the history
…-async-void-functions

Fix exception propagation to JS for async void functions
  • Loading branch information
li-feng-sc authored Feb 20, 2024
2 parents 5e37ac6 + 4061704 commit f077e04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions support-lib/wasm/Future_wasm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class FutureAdaptor
void doResolve() {
try {
if constexpr (std::is_void_v<typename RESULT::CppType>) {
_future->get();
_resolveFunc(em::val::undefined());
} else {
_resolveFunc(RESULT::Boxed::fromCpp(_future->get()));
Expand Down

0 comments on commit f077e04

Please sign in to comment.