Re: Professional Error Handling
Re: Professional Error Handling
- Subject: Re: Professional Error Handling
- From: Jens Alfke <email@hidden>
- Date: Fri, 23 Oct 2009 08:48:46 -0700
On Oct 23, 2009, at 7:03 AM, Squ Aire wrote:
I'm not much for the second suggestion of putting all the errors in
one big header file (thanks for the idea nonetheless!). I like the
idea of seperating it like you have, only that I'm not sure what
purpose it serves to make it available to all other classes through
a header file. At least not in my app. Maybe your app needs it to be
public.
Because you're probably going to use the same error domain in multiple
source (.m) files. Either creating those errors, or maybe checking for
them. Errors are implicitly part of the API of the code that generates
them, so they should be declared in a header for the use of consumers
of that API.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden