Re: Warning about NS_DURING (was "Bug in Cocoa drawing?")
Re: Warning about NS_DURING (was "Bug in Cocoa drawing?")
- Subject: Re: Warning about NS_DURING (was "Bug in Cocoa drawing?")
- From: Clark Cox <email@hidden>
- Date: Sun, 4 Apr 2004 10:46:10 -0400
On Apr 04, 2004, at 10:37, Drew McCormack wrote:
>
Just to follow up on this thread, and hopefully save others a lot of
>
trouble, it seems my problem had nothing to do with drawing. It had to
>
do with how I was using NS_DURING blocks. I had added some return
>
statements in the middle of the exception handling blocks, which caused
>
the problems. With hindsight, I should have known that the old
>
exception handing macros would break if you do this, but it just hadn't
>
occurred to me.
>
>
So, be warned: Don't put return statements in NS_DURING blocks.
Yes, if you need to return from within a NS_DURING block, use
NS_VOIDRETURN or NS_VALUERETURN(value, type).
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.