Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve identity of exceptions from JS when passing through wasm #189

Closed
Ms2ger opened this issue Nov 8, 2021 · 0 comments · Fixed by #218
Closed

Preserve identity of exceptions from JS when passing through wasm #189

Ms2ger opened this issue Nov 8, 2021 · 0 comments · Fixed by #218

Comments

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 8, 2021

Some discussion starting at #183 (comment) 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.

@aheejin aheejin mentioned this issue Nov 20, 2021
11 tasks
aheejin added a commit to aheejin/exception-handling that referenced this issue Feb 4, 2022
This updates the explainer on
- We add stack trace option to `Exception` class in the JS API
- `Exception` can contain an optional `externref` to carry a stack trace
- `Exception` is not a subclass of JS `Error`

Addresses WebAssembly#183 and WebAssembly#189.
aheejin added a commit to aheejin/exception-handling that referenced this issue Feb 4, 2022
This updates the explainer on
- We add stack trace option to `Exception` class in the JS API
- `Exception` can contain an optional `externref` to carry a stack trace
- `Exception` is not a subclass of JS `Error`

The WebIDL syntax is suggested by @eqrion in
WebAssembly#183 (comment)
and
WebAssembly#183 (comment).

Addresses WebAssembly#183 and WebAssembly#189.
Ms2ger pushed a commit that referenced this issue Feb 10, 2022
This updates the explainer on
- We add stack trace option to `Exception` class in the JS API
- `Exception` can contain an optional `externref` to carry a stack trace
- `Exception` is not a subclass of JS `Error`

The WebIDL syntax is suggested by @eqrion in
#183 (comment)
and
#183 (comment).

Addresses #183 and #189.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant