Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: refactor deprecated UVException usage in pipe-wrap.cc
  • Loading branch information
gengjiawen committed May 4, 2019
commit 3a43cdb44f385b18e8be5c3628cf76aa59d9c0bc
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