[embind] Allow awaiting Promises in non-Promise coroutines & catching Promise C++ exceptions#26195
[embind] Allow awaiting Promises in non-Promise coroutines & catching Promise C++ exceptions#26195stevenwdv wants to merge 6 commits intoemscripten-core:mainfrom
Conversation
…ipten-core#26064), allow catching Promise C++ exceptions (closes emscripten-core#25396) Still crashes on `test_embind_val_coro_catch_cpp_exception`, not sure why. TODO: What to do on rejection in the !__cpp_exceptions case in a non-Promise coroutine?
|
Btw, if anyone knows why the rethrow of the |
|
The cause of the crash seems to be #26213 |
I'll not terminate here so non-C++ exceptions still propagate to `await_resume`
Add -fno-exceptions test
Add separate test_embind_val_coro_propagate_js_error_disabled_catch test
|
Currently |
Actually, the error message for But I don't see where I'm referencing Besides that |
Still crashes on
test_embind_val_coro_catch_cpp_exception,not sure whydue to #26213. EDIT: resolved.TODO:
What to do on rejection in the!__cpp_exceptionscase in a non-Promise coroutine?await_resumeanyway.Seems hard to distinguish since there's 3 possible exception types depending on the compiler settings, once of which is just a number.test_embind_val_coro_propagate_js_errorfailsFixes: #26064
Fixes: #25396