fix(napi): functions related to errors (#17370)

This commits fixes various NAPI functions related to creation and
throwing of errors.
This commit is contained in:
Bartek Iwańczuk 2023-01-15 04:36:55 +01:00 committed by GitHub
parent e4c6e6e95f
commit df8bfa26be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 1071 additions and 305 deletions

View file

@ -158,8 +158,8 @@ fn napi_get_node_version(
env: *mut Env,
result: *mut *const napi_node_version,
) -> Result {
let _: &mut Env = env.as_mut().ok_or(Error::InvalidArg)?;
crate::check_arg!(result);
crate::check_env!(env);
crate::check_arg!(env, result);
*result = &NODE_VERSION as *const napi_node_version;
Ok(())

File diff suppressed because it is too large Load diff