Closed
Description
While going through the test coverage, I noticed that the else
branch is actually not covered in the test case here
node/lib/internal/async_hooks.js
Lines 160 to 174 in 17a527e
Will the else case ever happened? According to the Node.js docs here, error.stack
is always a string
. So why would we ever do a check on that portion and have an else
branch?
From what I understand, fatalError(e)
is only used to capture error when the callback from the registered hooks failed and it doesn't seem necessary in this case.
Let me know what you think.
Activity