javascript Programming Glossary: process.on
Javascript Asynchronous Exception Handling with node.js http://stackoverflow.com/questions/14301839/javascript-asynchronous-exception-handling-with-node-js are really not expressive. I've only come up with using process.on uncaughtException callback and similar code using node 0.8 Domains.. you catch the exception in the domain it still bubbles to process.on uncaughtException . I dealt with this in my process.on uncaughtException.. to process.on uncaughtException . I dealt with this in my process.on uncaughtException with if typeof e object e domain_thrown However..
How to write asynchronous functions for Node.js http://stackoverflow.com/questions/6898779/how-to-write-asynchronous-functions-for-node-js Another common pattern is on 'error' . For example process.on 'uncaughtException' function err console.log 'Caught exception..
Handling CTRL+C event in Node.js on Windows http://stackoverflow.com/questions/9199105/handling-ctrlc-event-in-node-js-on-windows memory to file when exiting. I figured it was as simple as process.on 'exit' function handle your on exit code console.log Exiting.. anything else. Of course you could both bind a function to process.on exit and call it inside the if block below. var tty require..
|