From 4061704df451bc5dd4e62a9bf12c8f28a46b83d8 Mon Sep 17 00:00:00 2001 From: arekmula Date: Fri, 16 Feb 2024 12:12:22 +0100 Subject: [PATCH] Fix propagation of exception from async void function by getting the result from future so the exception can be thrown, catched and translated --- support-lib/wasm/Future_wasm.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/support-lib/wasm/Future_wasm.hpp b/support-lib/wasm/Future_wasm.hpp index ac501289..8b70a864 100644 --- a/support-lib/wasm/Future_wasm.hpp +++ b/support-lib/wasm/Future_wasm.hpp @@ -96,6 +96,7 @@ class FutureAdaptor void doResolve() { try { if constexpr (std::is_void_v) { + _future->get(); _resolveFunc(em::val::undefined()); } else { _resolveFunc(RESULT::Boxed::fromCpp(_future->get()));