Skip to content

Commit 9556ef3

Browse files
fhinkelMylesBorins
authored andcommitted
vm: add error message if we abort
Add an error message in watchdog if we abort because uv_loop_init fails. PR-URL: #8634 Fixes: #8555 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent acbe4d3 commit 9556ef3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node_watchdog.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ Watchdog::Watchdog(Environment* env, uint64_t ms) : env_(env),
1414
loop_ = new uv_loop_t;
1515
CHECK(loop_);
1616
rc = uv_loop_init(loop_);
17-
CHECK_EQ(0, rc);
17+
if (rc != 0) {
18+
FatalError("node::Watchdog::Watchdog()",
19+
"Failed to initialize uv loop.");
20+
}
1821

1922
rc = uv_async_init(loop_, &async_, &Watchdog::Async);
2023
CHECK_EQ(0, rc);

0 commit comments

Comments
 (0)