Re: Dealing with exceptions in a drawing stack
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