syscall-napi 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/native/syscall.c +3 -1
  2. package/package.json +1 -1
package/native/syscall.c CHANGED
@@ -148,7 +148,9 @@ static napi_status syscall_sync_entry(napi_env env, napi_value* args, int arg_co
148
148
  ctx.native_args[6]);
149
149
 
150
150
  if(ctx.res < 0) {
151
- NAPILIB_CHECK(napilib_create_error_by_errno(env, errno, result));
151
+ napi_value error;
152
+ NAPILIB_CHECK(napilib_create_error_by_errno(env, errno, &error));
153
+ NAPILIB_CHECK(napi_throw(env, error));
152
154
  } else {
153
155
  NAPILIB_CHECK(napi_create_bigint_int64(env, ctx.res, result));
154
156
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "syscall-napi",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "description": "Node.js module to perform promise-based asynchronous syscalls",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {