added example to catch node.js execptions