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.
- package/native/syscall.c +3 -1
- 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
|
-
|
|
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
|
}
|