Closed Raynos closed 11 years ago
Close but not quite. It does not propagates erros, it should I think.
That depends.
promises propagate errors by saying pipe(a, b)
means if a errors then emit error on b.
domains handle errors by saying pipe(a, b)
a and b are now on the domain, errors go to that domain.
Not sure which is a better error handling model.
I was thinking in terms of propagating errors from a
to b
. That way you don't need domain, it's just you put a capture(stream, handle)
wherever you need to handle errors.
that works good enough for me.
If you'll send in pull request with implementation I'll gladly accept. Otherwise I'll have it in by Monday ;)
https://github.com/Raynos/reflex-todo/blob/master/lib/pipe.js