From 67c8511ea13b6def8c39042b10749a9b182feeac Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 26 Oct 2017 22:04:07 -0700 Subject: src: use internal/errors for startSigintWatchdog Move the throw out of c++ and into js using internal/errors PR-URL: https://github.com/nodejs/node/pull/16546 Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Joyee Cheung Reviewed-By: Michael Dawson --- src/node_util.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/node_util.cc') diff --git a/src/node_util.cc b/src/node_util.cc index cf26eca692..fa30ae4472 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -135,10 +135,7 @@ static void SetHiddenValue(const FunctionCallbackInfo& args) { void StartSigintWatchdog(const FunctionCallbackInfo& args) { int ret = SigintWatchdogHelper::GetInstance()->Start(); - if (ret != 0) { - Environment* env = Environment::GetCurrent(args); - env->ThrowErrnoException(ret, "StartSigintWatchdog"); - } + args.GetReturnValue().Set(ret == 0); } -- cgit v1.2.3