• 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: Dealing with exceptions in a drawing stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dealing with exceptions in a drawing stack


  • Subject: Re: Dealing with exceptions in a drawing stack
  • From: email@hidden
  • Date: Fri, 16 Jan 2009 11:01:40 +0100


On 16 Jan 2009, at 10:33, email@hidden wrote:

What are you doing that could throw an exception?  After all,
exceptions are used to indicate programmer error, and are expensive to
throw.  Something tells me that you shouldn't be worrying about
exceptions in your drawing code to begin with.

What Graham doesn't tell us is whether it is his code or AppKit that is actually throwing the exceptions. I have seen times when Appkit itself inadvertently throws an exception that should be caught internally but isn't. This is usually due to a bug in AppKit itself. Usually these cases show up during development and have to be manually worked around by enclosing the offending call in a try/catch block.


If it is his own code, then yes, throwing exceptions this way is not a good idea in Obj-C. (If he came from a C++ background I can see why he would do it though)

Matt
_______________________________________________

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


References: 
 >Dealing with exceptions in a drawing stack (From: Graham Cox <email@hidden>)
 >Re: Dealing with exceptions in a drawing stack (From: "Kyle Sluder" <email@hidden>)
 >Re: Dealing with exceptions in a drawing stack (From: Graham Cox <email@hidden>)
 >Re: Dealing with exceptions in a drawing stack (From: email@hidden)

  • Prev by Date: Re: Protocol + Delegate = conflict types
  • Next by Date: Re: ObjC in time-critical parts of the code
  • Previous by thread: Re: Dealing with exceptions in a drawing stack
  • Next by thread: Re: Dealing with exceptions in a drawing stack
  • Index(es):
    • Date
    • Thread