Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple catch handlers #6

Open
nijikokun opened this issue Aug 11, 2016 · 0 comments
Open

Multiple catch handlers #6

nijikokun opened this issue Aug 11, 2016 · 0 comments

Comments

@nijikokun
Copy link
Owner

nijikokun commented Aug 11, 2016

A feature of A+ Promises that I enjoy is the support for multiple catch handlers at key points.

Problems

  • Catch before any step registered, is that the global catch handler?
  • Catch after last step, is that the global catch handler, or only for the item before?
  • Catch after last step, should no catch step registered, we assume this is global for all prior.

Both 1 and 3 are valid cases.

Solution

Implement logic that supports 1 & 3.

  • Store steps, keep step index
  • Implement catch check logic that relies on step index and catch indexes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant