Follow the pattern used my much of Cocoa-touch. Many methods return nil
or NO
when there is an error and such methods have an NSError
out parameter with details about the error.
You can propagate the result and error up the layers as needed. Or a layer may wrap the error with a more layer specific error and pass up the new error.
Example methods that follow this pattern are:
NSFileManager copyItemAtPath:toPath:error:
NSFileManager attributesOfItemAtPath:error: