On 2009 Nov 11, at 15:36, Jim Correia wrote:
Cocoa reserves the use of exceptions for programming errors an unexpected runtime errors.
:))
Trying to remove an observer for a key path which has already been removed (or never registered) falls into the programming error class...
Almost always true. But what if, and yes I know this is pretty flakey but just assume it could happen, that I needed to do some very expensive operation to determine whether or not an observation had been removed. Then, it would be efficient and smart to send the removeObserver:: message unconditionally.
But how is the programmer to know this is an error if it's not documented as a "don't do"? If indeed this is not documented, then in my opinion it's a documentation error.
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com