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