alef 0.62.7

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
/// Convert a `{{ rust_path }}` error to a NAPI error.
///
/// The stable numeric error code is deliberately not interpolated into this message —
/// `napi::Error` has no per-variant subclass to attach it to. When available, it is exposed
/// as a structured `code` field on the `*Info` companion class instead (see
/// `gen_napi_error_class`), never smuggled into human-facing text. (~keep)
#[allow(dead_code)]
fn {{ fn_name }}(e: {{ rust_path }}) -> napi::Error {
    napi::Error::new(napi::Status::GenericFailure, e.to_string())
}