Skip to content

Commit

Permalink
src: use env->ThrowUVException in pipe_wrap
Browse files Browse the repository at this point in the history
Signed-off-by: James M Snell <[email protected]>

PR-URL: #35493
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
jasnell authored and MylesBorins committed Nov 3, 2020
1 parent df152e4 commit 7873104
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
using v8::Int32;
using v8::Isolate;
using v8::Local;
using v8::MaybeLocal;
using v8::Object;
Expand Down Expand Up @@ -216,9 +215,8 @@ void PipeWrap::Open(const FunctionCallbackInfo<Value>& args) {
int err = uv_pipe_open(&wrap->handle_, fd);
wrap->set_fd(fd);

Isolate* isolate = env->isolate();
if (err != 0)
isolate->ThrowException(UVException(isolate, err, "uv_pipe_open"));
env->ThrowUVException(err, "uv_pipe_open");
}


Expand Down

0 comments on commit 7873104

Please sign in to comment.