how to catch error nodejs code example
Example: node js catch any errors
process.on('uncaughtException', function(err) {
console.log('Caught exception: ' + err);
});
process.on('uncaughtException', function(err) {
console.log('Caught exception: ' + err);
});