Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-10-28 03:20:54 +0300
committerJames M Snell <jasnell@gmail.com>2017-11-02 21:58:38 +0300
commit3d9d84940ae11a026c8f14e1b502794db7538765 (patch)
tree634619ce40599ea3da38b37398314dfeceecd7cf /src/tty_wrap.cc
parent056b858e57a72c5429d9278bc7b77d1922a2dbe4 (diff)
tty: convert to internal/errors using SystemError
PR-URL: https://github.com/nodejs/node/pull/16567 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/tty_wrap.cc')
-rw-r--r--src/tty_wrap.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc
index 872a126c6d4..4d49e1a65c8 100644
--- a/src/tty_wrap.cc
+++ b/src/tty_wrap.cc
@@ -154,9 +154,10 @@ void TTYWrap::New(const FunctionCallbackInfo<Value>& args) {
int err = 0;
TTYWrap* wrap = new TTYWrap(env, args.This(), fd, args[1]->IsTrue(), &err);
- if (err != 0)
- return env->ThrowUVException(err, "uv_tty_init");
-
+ if (err != 0) {
+ env->CollectUVExceptionInfo(args[2], err, "uv_tty_init");
+ args.GetReturnValue().SetUndefined();
+ }
wrap->UpdateWriteQueueSize();
}