The bottom line is "*APIs should be consistent in behavior*".
On Fri, Aug 30, 2013 at 7:39 AM, Isaac Schlueter <i...@izs.me> wrote: > On Thu, Aug 29, 2013 at 11:19 AM, Bryan Donovan <brdono...@gmail.com> > wrote: > > Thanks, I just wanted to make sure my understanding was correct in that > > there really is no problem with the specific case I presented. > > That understanding is incorrect. > > The exact problem being described in Havoc's post and in mine, is a > problem with the specific case you presented. > > Throw now, or nextTick the callback. Don't do it half-way. > > On Thu, Aug 29, 2013 at 7:04 PM, Isaac Schlueter <i...@izs.me> wrote: > > if (!args.index) { next(new Error('index required')); } > > if (!args.type) { next(new Error('type required')); } > > Ugh, a bug in my example. It should be `return next(new Error(...))`, > so that it doesn't try to do the async thing if it's already called > the cb with an error. > > -- > -- > 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. > -- -- 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.