src: use env->ThrowUVException in pipe_wrap
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/35493 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
78e58755f7
commit
530acd1071
@ -40,7 +40,6 @@ using v8::Function;
|
|||||||
using v8::FunctionCallbackInfo;
|
using v8::FunctionCallbackInfo;
|
||||||
using v8::FunctionTemplate;
|
using v8::FunctionTemplate;
|
||||||
using v8::Int32;
|
using v8::Int32;
|
||||||
using v8::Isolate;
|
|
||||||
using v8::Local;
|
using v8::Local;
|
||||||
using v8::MaybeLocal;
|
using v8::MaybeLocal;
|
||||||
using v8::Object;
|
using v8::Object;
|
||||||
@ -216,9 +215,8 @@ void PipeWrap::Open(const FunctionCallbackInfo<Value>& args) {
|
|||||||
int err = uv_pipe_open(&wrap->handle_, fd);
|
int err = uv_pipe_open(&wrap->handle_, fd);
|
||||||
wrap->set_fd(fd);
|
wrap->set_fd(fd);
|
||||||
|
|
||||||
Isolate* isolate = env->isolate();
|
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
isolate->ThrowException(UVException(isolate, err, "uv_pipe_open"));
|
env->ThrowUVException(err, "uv_pipe_open");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user