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: #27562
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
gengjiawen authored and targos committed May 10, 2019
1 parent 66cf89f commit 62fe342
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 62fe342

Please sign in to comment.