exception-handling icon indicating copy to clipboard operation
exception-handling copied to clipboard

Preserve identity of exceptions from JS when passing through wasm

Open Ms2ger opened this issue 2 years ago • 0 comments

Some discussion starting at https://github.com/WebAssembly/exception-handling/issues/183#issuecomment-955090191 already.

Proposal: attach an optional externref to the core exception, and make sure it's propagated by catch; rethrow, but not expose it to wasm code. Then hosts that don't need it, should be able to avoid storing it at all. The JS API spec can then extract that value when it gets an exception from wasm, or create a new one if there isn't one.

Ms2ger avatar Nov 08 '21 09:11 Ms2ger