I thought about the least-surprise issue after posting and came to a similar 
conclusion as you. I might not like the imposition of semantics into my event 
space, but if there's established convention, especially among your 
dependencies, it's a disaster to go against it.

I'd actually implemented your one-line suggestion already as a generic utility 
function, but I'd originally been looking for a global solution. But my feeling 
now is that you should never use an event called "error" unless you are using 
it to transmit async exceptions in the conventional manner. It's just too much 
to keep in mind if you have to remember which emitters respect the convention, 
and which ones are using the hack to circumvent it.

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to