NSError domains / custom domains - conventions and best practices NSError domains / custom domains - conventions and best practices objective-c objective-c

NSError domains / custom domains - conventions and best practices


Apple generally publishes their NS/CFError codes in a header named FrameworkNameErrors.h. For example, Foundation's error codes are in Foundation/FoundationErrors.h. In addition, they generally publish the domain and codes in their documentation for the framework.

Any independent author of a framework with its own error domain and codes should do the same.