I have been really trying to incorporate the code into my app, however there is a couple of things I don't understand.
In GroupOperation, when you call cancel() it calls cancel on all the operations in the queue, however if cancelWithError is called, this is not the case, why?
It seems the pattern is to always call finish, even if the operation is cancelled as seen in evaluateConditions where it changes the state to cancelled but still calls finish() but if we would call cancel() on a group operation, all operations will be cancelled meaning finishOperation would never be called cause we cancelled all the operations in queue. Is it a must for any Operation that uses the timeout observer to subclass cancelWithError and call finishWithError itself?
Another thing is that the error handling pattern seems to be wierd. It seems like each operation is showing error UI itself instead of letting the object that created the operation to decide what to do with the failure, even thogh the operation doesn't have any context about whats going on outside.
I watched the talk maybe 3-4 times and I understand how could this working if errors never occour, but I really don't understand how to properly error handle with this system. I am sure that my app is not a quarter of the complexity level that the wwdc app has, maybe I am missing something?
Yoav.