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 <jasnell@gmail.com>

PR-URL: #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>
  • Loading branch information
jasnell authored and danielleadams committed Oct 6, 2020
1 parent 8e3a81e commit 392c881
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 392c881

Please sign in to comment.