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

Future rejection should also reject children futures #6

Closed
othierry opened this issue May 16, 2017 · 2 comments
Closed

Future rejection should also reject children futures #6

othierry opened this issue May 16, 2017 · 2 comments
Assignees
Labels

Comments

@othierry
Copy link
Owner

When a future rejects, the children futures are not rejected. This causes fail blocks of the children future to never be called.

Example

Without children

Future<Int> {
  throw NSError(...)
}.fail { error in
  // This is called as expected
}

With children

Future<Int> {
  throw NSError(...)
}.then { x -> String in // Child future
  return "\(x)"
}.fail { error in
  // This is never called as fail block belongs to the child future
}
@othierry othierry added the bug label May 16, 2017
@othierry othierry self-assigned this May 16, 2017
@othierry othierry changed the title Future rejection show also reject children futures Future rejection should also reject children futures May 16, 2017
@othierry
Copy link
Owner Author

othierry commented May 16, 2017

Fixed and test case added (The actual test case was wrong and made the error passing...).
Will roll out new version.

@othierry
Copy link
Owner Author

othierry commented May 16, 2017

Fixed in 2.0.0rc3 and available on cocoapods.

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

No branches or pull requests

1 participant