Bond: Stop fatal error on non convertible value in 'RKKeyValueSignal'

I don’t believe it is proper behavior here for Bond to cause my application to crash when an RKKeyValueSignal gets a change that is not convertible to the signal’s type. I would instead like to see the signal send me an error in this case. The user should be able to handle this error as they see fit, rather than having an application crash.

I have found this causing many crashes in my application when using NSManagedObjects and deallocating multiple view controllers, (i.e. when popping to the root view controller of a navigation stack). This is because I am deallocating the managed object’s context simultaneously to the deallocation of the view controllers. The context is set to nil for the objects and a KVO event is fired with a value of nil. The signals, which will be shortly disposed of, but have not been yet, cannot convert the nil value to the expected type and cause a fatal error.

Thoughts?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Never mind. I figured this out! Thanks so much!