Looking at the Error Handling Programming Guide, I understand that in cases like the following I must never evaluate the NSError parameter theError unless the return value is NO
BOOL success = [myDoc writeToURL:[self docURL] ofType:@"html" error:&theError];
What happens in casses when the return value is not a success BOOL, and instead it is a collection object?
Take for example [NSIncrementalStore obtainPermanentIDsForObjects:error]. I must not evaluate an error using the error parameter. What should I look for? I imagine I could receive either a nil pointer or an empty array. In this case an empty array does not seem a good response, although in other functions an empty array might be a good one. I can read that if an error occurs, the error object will contain a description of what happened, but it is not so clear how can I find out that an error actually happened.
What is the normal Cocoa or Foundation way to indicate an error in cases like these?