Skip to content

[EH] Stack trace support for Wasm EH #17466

@aheejin

Description

@aheejin

Currently, both in Emscripten and Wasm EH, if you throw an exception, stack traces are not attached by default. This was, at least for Wasm EH, an intentional decision, because Wasm exception itself can be used not only for errors but for other control flow structures with which slowdown can be problematic. Native C++ exceptions don't have stack traces either.

But it is still convenient to see stack traces when debugging. I think we can attach stack traces when in debug / assert mode, by throwing an Error object instead of a raw string in case of Emscripten EH, and turning the optional traceStack option on in the JS API for Wasm EH.

Related request: #17437

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions