napi-rs/examples/napi/src/error.rs

7 lines
139 B
Rust
Raw Normal View History

2021-09-24 10:46:27 +09:00
use napi::bindgen_prelude::*;
#[napi]
fn throw_error() -> Result<()> {
2021-09-24 10:46:27 +09:00
Err(Error::new(Status::InvalidArg, "Manual Error".to_owned()))
}