Skip to main content

gen_wasm_error_converter

Function gen_wasm_error_converter 

Source
pub fn gen_wasm_error_converter(error: &ErrorDef, core_import: &str) -> String
Expand description

Generate a converter function that maps a core error to a JsValue object with code (string) and message (string) fields, plus a private error_code helper that returns the variant code string.