On 16 Jan 2009, at 10:33, kyle.slu...@gmail.com 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 (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