-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
How to avoid unsubscribe after catch error or resubscribe #1218
Comments
You can put |
Hi Erik, If I put repeat at the end, the block in flattenMap will be called after error happened and then it falls to a infinite loop. |
What signal do you want |
If you put the RAC(self, A) = [RACObserve(self, B)
flattenMap:^(id param) {
return [[self
doSomthingToGetA:param]; // this may throw an error
catch:^(NSError *error){
//do some other things
return [RACSignal return:nil];
}];
}]; |
Thanks mdlep, that fixed my problem. |
Excellent solution!Thank mdiep :)@mdiep |
Hi Guys,
I have a some code like below
when the error happened, next time I cannot get the signal for B anymore. So my question is there any way to avoid unsubscribe after catch error? Or do I need to use any other methods such as then: or something else?
The text was updated successfully, but these errors were encountered: