How to handle the \"Unhandled exceptions\" in Node.js?

Answer

It can be caught at the "Process level" by attaching a handler for uncaughtException event.
Example:
process.on('uncaughtException', function(err) {
  console.log('Caught exception: ' + err);
});

All node.js Questions

Ask your interview questions on node-js

Write Your comment or Questions if you want the answers on node-js from node-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---