Q6
When do uncaught exceptions generate events?
A.
When handlers are registered
AnswerB.
When handlers are deregistered
C.
When handler functions are called
D.
When handlers do not have a matching catch clause
Answer: Option A
Solution
Answer: Option A
Solution:
Uncaught exceptions generate events, if any handlers are registered. Otherwise, the exception just makes Node print an error and exit.
process.on("uncaughtException", function(e) { console.log(Exception, e); });