Skip to main content

Module error_gen

Module error_gen 

Source

Functions§

converter_fn_name
Return the converter function name for a given error type.
gen_csharp_error_types
Generate C# exception sub-classes for each error variant.
gen_ffi_error_codes
Generate a C enum of error codes plus an error-message function declaration.
gen_go_error_types
Generate Go sentinel errors and a structured error type for an ErrorDef.
gen_java_error_types
Generate Java exception sub-classes for each error variant.
gen_magnus_error_converter
Generate a converter function that maps a core error to magnus::Error.
gen_napi_error_converter
Generate a converter function that maps a core error to napi::Error.
gen_napi_error_types
Generate a JsError enum with string constants for each error variant name.
gen_php_error_converter
Generate a converter function that maps a core error to PhpException.
gen_pyo3_error_converter
Generate a to_py_err converter function that maps each Rust error variant to a Python exception. Uses Error-suffixed names for variant exceptions (N818 compliance).
gen_pyo3_error_registration
Generate m.add(...) registration calls for each exception type. Uses Error-suffixed names for variant exceptions (N818 compliance). Prefixes names that would shadow Python builtins (A004 compliance).
gen_pyo3_error_types
Generate pyo3::create_exception! macros for each error variant plus the base error type. Appends “Error” suffix to variant names that don’t already have it (N818 compliance). Prefixes names that would shadow Python builtins (A004 compliance).
gen_rustler_error_converter
Generate a converter function that maps a core error to a Rustler error tuple {:error, reason}.
gen_wasm_error_converter
Generate a converter function that maps a core error to JsValue.
magnus_converter_fn_name
Return the Magnus converter function name for a given error type.
napi_converter_fn_name
Return the NAPI converter function name for a given error type.
php_converter_fn_name
Return the PHP converter function name for a given error type.
python_exception_name
Return the Python exception name for a variant, avoiding shadowing of Python builtins.
rustler_converter_fn_name
Return the Rustler converter function name for a given error type.
wasm_converter_fn_name
Return the WASM converter function name for a given error type.