Skip to content

Commit

Permalink
vm: add error message if we abort
Browse files Browse the repository at this point in the history
Add an error message in watchdog if we abort because uv_loop_init fails.

PR-URL: #8634
Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
fhinkel authored and MylesBorins committed Jan 24, 2017
1 parent 3fe6adc commit 56a5857
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Watchdog::Watchdog(Environment* env, uint64_t ms) : env_(env),
loop_ = new uv_loop_t;
CHECK(loop_);
rc = uv_loop_init(loop_);
CHECK_EQ(0, rc);
if (rc != 0) {
FatalError("node::Watchdog::Watchdog()",
"Failed to initialize uv loop.");
}

rc = uv_async_init(loop_, &async_, &Watchdog::Async);
CHECK_EQ(0, rc);
Expand Down

0 comments on commit 56a5857

Please sign in to comment.