Skip to main content

gen_napi_error_class

Function gen_napi_error_class 

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

Generate a #[napi] class struct for the error type that stores the whitelisted introspection method values as fields and exposes them as methods.

Returns an empty string when error.methods is empty.