How to detect failure and reset/restart webassembly Module?
问题 I am trying to get some C++ functions to run on the browser using WebSssembly. I am following this tutorial. I would like to know: How to detect (at JS side) an 'uncaught exception' coming from C++ code? How to reset/restart WebAssembly Module generated by emcc in a way that avoids memory leaks? Adding exception catching functionality ( DISABLE_EXCEPTION_CATCHING=0 ) seems to increase the file size too much. Any help will be greatly appreciated. The sample C++ code is as follows: // C++