Skip to content

[WASM] Propagate error messages from WASM into JavaScript. #2328

@nsthorat

Description

@nsthorat

When an error happens with construction an XNN Operator we should have the ability to propagate the error back into JavaScript.

We can do this with function pointer callbacks and a utility method to propagate the error.

See the section here "Call JavaScript functions from C/C++": https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html

Another idea is to return a special exit code from kernels (instead of the void return type), but we won't be able to pass a user-friendly message back up.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions