Skip to content

Glossary: Rust in Practice

JsError

Also written: throw, JavaScript exception

A Rust error type that wasm-bindgen turns into a JavaScript `Error`. Returning `Err(JsError)` makes JavaScript throw, and `try`/`catch` can catch it.

Where the book teaches it

Related terms

wasm-bindgenPyResult