I'm porting a math library and its test harness to WebAssembly. The test
harness is allowed to be specific to Node.js, but the library is not. Both
are compiled from C and C++ code, which is my comfort zone. JavaScript is a
language I don't know well and haven't done anything difficult in.

I'm aware that WASI doesn't support traditional signals
<https://github.com/WebAssembly/WASI/issues/166>. At present, when I
intentionally set off an access violation, I get "RuntimeError: memory
access out of bounds" and a traceback as Node.js exits.

Is there a way to catch these errors and prevent Node.js exiting? Ideally,
I'd be able to notify the test harness in some way that this had happened.
If this involves JavaScript, please explain slowly and gently: I'm from the
C world and new to web applications.

The reason I'm asking this is that I will have to provide support to
customers when the WebAssembly version of the library is released, and
prefer to have my answers ready ahead of time. My employer wants to
maintain their good reputation for customer service, and goes as far as
having tests for deliberately-set-off runtime errors as part of routine
testing, so that we can document what happens and how to handle them.

Thanks very much,

John

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAH1xqgnMY0%2BoOLMs51mo2x%2BBUhWdZq%3DkxFp-En7AX3OsVqcoQQ%40mail.gmail.com.

Reply via email to