Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Chain rescues and failures? #8

zakdances opened this Issue Dec 19, 2013 · 3 comments


None yet
2 participants

I've been using the chain: method quite a bit, and I was wondering if you'd thought about the ability to insert rescue and failure blocks into the chain in addition to then blocks?


b52 commented Dec 21, 2013

That's an interesting point and I honestly never thought about it until this point. Yet I believe you are right that it might make sense to insert rescue blocks, however I don't see why would want to insert a failure. Because you can always do that on the promise returned by chain:, which fails if any involved promise fails unless you specify a rescue handler.
I'll look into the possibility to allow the insertion of rescue handlers, if you got already something I highly appreciate pull requests. ;)


b52 commented Jan 9, 2014

@zakdances I just pushed a branch called chain that contains a new implementation of the chain: combinator. This combinator can in theory cope with all five kinds of block handlers, but I haven't implemented the tests yet to see if that is actually correct due to a lack of time.
If you're willing to you could give it a try.


b52 commented Feb 8, 2014

Took me a bit due to exams and work, but I finally finished the new implementation and merged the branch.

@b52 b52 closed this Feb 8, 2014

@b52 b52 added this to the 0.2 milestone Feb 8, 2014

@b52 b52 self-assigned this Feb 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment