Benjamin,

You may find TJ Holowaychuk's Koa.js <https://github.com/koajs/koa>interesting 
-- middleware using generators. Apparently there are big 
performance benefits and you can catch both sync and async errors with 
try/catch... but as others have said, it's experimental: you have to be on 
the latest (unstable) release of node and you have to enable generators in 
v8 with a command-line flag.

You've probably read the official 
warning<http://nodejs.org/api/domain.html#domain_warning_don_t_ignore_errors>about
 using domains as a way to ignore errors, but I figured I'd post a 
link just in case.

Regarding domains, in The Future of Programming in 
Node.js<https://groups.google.com/forum/#!searchin/nodejs/domains/nodejs/9afurRCTlOc/GvlFNmm_AtAJ>,
 
isaacs said:

> Domains will be refactored to support more generic 
> continuation-tracking systems, to enable alternative error-handling 
> mechanisms in userland.  Eventually the Domain module will be a thing 
> that could be done in userland, but it will continue to be bundled 
> with the Node binary.

Personally, I'm excited about this low-level hook because it should make it 
possible to implement automatic long-stack traces without hacks (though 
this is probably something you would want to have only in debug mode due to 
the performance implications). It might even make it possible to avoid 
littering the code with "if (err) return cb(err)" (or d.intercept) at ever 
layer of asynchrony -- that would be quite nice.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
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 nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to