Discussion :: Javascript - CS
- When do uncaught exceptions generate events?
A.
When handlers are registered |
B.
When handlers are deregistered |
C.
When handler functions are called |
D.
When handlers do not have a matching catch clause |
Answer : Option A
Explanation :
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); });
Be The First To Comment