> -----Original Message-----
> From: cocoa-dev-bounces+dbridges=codecomplete....@lists.apple.com
> [mailto:cocoa-dev-bounces+dbridges=codecomplete....@lists.apple.com] On
> Behalf Of Squ Aire
> Sent: Friday, October 23, 2009 7:03 AM
> To: bryanhe...@mac.com
> Cc: cocoa-dev@lists.apple.com
> Subject: RE: Professional Error Handling
>
<snip>
> > On Oct 22, 2009, at 7:40:46 PM, Squ Aire wrote:
<snip>
> > And then of course return NO or nil from the method. Is this how the
> professionals would do it?
<snip>

FWIW, there are some people (myself included) that consider "error numbers" to 
be something of an anti-pattern when exception handling is available. Because 
of [IMHO] improvements in gcc, Objective-C now supports exception handling and 
it might be worth your time to investigate how exceptions work. If you need 
more examples, a search for the Java or C++ standard exception hierarchies 
might give you some additional insight as to how to use the existing exceptions 
and/or derive an application-specific hierarchy to greatly simplify the 
handling of exceptional conditions.

N.B. Switching from error codes to exception handling can be somewhat 
disconcerting initially so it's probably not something you'd want to take on if 
you are under strong time pressures.

Regards,
Dick Bridges

"Multithreading is just one damn thing after, before, or simultaneous with 
another."
Scott Meyers and Andrei Alexandrescu (2004)
_______________________________________________

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

Reply via email to