catch all errors in 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);
});