Skip to content

Commit

Permalink
src: refactor deprecated UVException usage in pipe-wrap.cc
Browse files Browse the repository at this point in the history
PR-URL: nodejs#27562
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
gengjiawen authored and ZYSzys committed May 10, 2019
1 parent 6f2bd9d commit 07e0395
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
using v8::HandleScope;
using v8::Int32;
using v8::Isolate;
using v8::Local;
using v8::MaybeLocal;
using v8::Object;
Expand Down Expand Up @@ -216,8 +217,9 @@ 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)
env->isolate()->ThrowException(UVException(err, "uv_pipe_open"));
isolate->ThrowException(UVException(isolate, err, "uv_pipe_open"));
}


Expand Down

0 comments on commit 07e0395

Please sign in to comment.