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

Terminal continuation error handling #10

Open
aztecrex opened this issue Oct 29, 2014 · 1 comment
Open

Terminal continuation error handling #10

aztecrex opened this issue Oct 29, 2014 · 1 comment

Comments

@aztecrex
Copy link
Member

Errors thrown from continuations passed to terminal bindings such as forEach(..) and on(..) are silently dropped right now. There should be a mechanism by which such errors can be handled by the programmer.

The programmer is free, of course, to put error handling within the continuation function but this may be counter to expressiveness for unexpected conditions such as out of memory.

@aztecrex
Copy link
Member Author

Would be great if this could be scoped. Some ideas:

  1. install a terminal error handler at Async construction
  2. install a terminal error handler in of(..) and broken(..)
  3. install a scope at Async construction, scope designates error handling
  4. install a scope in of(..) and broken(..), scope designates error handling

A primary objective is to keep it simple.

The above ideas could get pretty complex if a promise could have multiple handlers or
scopes. Those could possibly be mitigated by a scoped promise factory but I cringe even
writing those words together.

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

No branches or pull requests

1 participant