• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Professional Error Handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Professional Error Handling


  • Subject: RE: Professional Error Handling
  • From: Dick Bridges <email@hidden>
  • Date: Sun, 25 Oct 2009 15:44:53 -0700
  • Acceptlanguage: en-US
  • Thread-topic: Professional Error Handling

> -----Original Message-----
> From: cocoa-dev-bounces+dbridges=email@hidden
> [mailto:cocoa-dev-bounces+dbridges=email@hidden] On
> Behalf Of Squ Aire
> Sent: Friday, October 23, 2009 7:03 AM
> To: email@hidden
> Cc: email@hidden
> 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 (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

  • Follow-Ups:
    • Re: Professional Error Handling
      • From: Jens Alfke <email@hidden>
    • Re: Professional Error Handling
      • From: Alastair Houghton <email@hidden>
    • Re: Professional Error Handling
      • From: Kyle Sluder <email@hidden>
References: 
 >Professional Error Handling (From: Squ Aire <email@hidden>)
 >RE: Professional Error Handling (From: Squ Aire <email@hidden>)

  • Prev by Date: pump event
  • Next by Date: PackageMaker installer not always installing into /Applications
  • Previous by thread: Re: Professional Error Handling
  • Next by thread: Re: Professional Error Handling
  • Index(es):
    • Date
    • Thread