firefish/packages/backend-rs/src/prelude.rs

4 lines
107 B
Rust
Raw Normal View History

pub fn to_napi_error<E: ToString>(err: E) -> napi::Error {
napi::Error::from_reason(err.to_string())
}