I thought this was an informative thread: Why throw exceptions in async code? <https://groups.google.com/forum/#%21searchin/nodejs/Why$20throw$20exceptions$20in$20async$20code$3F/nodejs/W9UVJCKcJ7Q/vU8OZ2sTULcJ>
There's a relatively new node.js feature that I think helps with this issue: http://nodejs.org/api/domain.html As it says there, "Domain error handlers are not a substitute for closing down your process when an error occurs", but by using it in conjunction with the cluster module, it seems you can rest assured that your whole server won't crash if an error isn't caught, without the problems involved with trying to keep your process running after process.on('uncaughtException', ...) 'By the very nature of how throw works in JavaScript, there is almost never any way to safely "pick up where you left off", without leaking references, or creating some other sort of undefined brittle state.' I haven't tried this out yet but it sounds like the way to go for production apps...is this now the recommended best practice? Thanks, Matt -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/96beae25-3351-4541-bf94-5ee48c52a497%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
