exception-handling
exception-handling copied to clipboard
Preserve identity of exceptions from JS when passing through wasm
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.