Re: Blocks vs. life, the universe and everything
Re: Blocks vs. life, the universe and everything
- Subject: Re: Blocks vs. life, the universe and everything
- From: Greg Guerin <email@hidden>
- Date: Sat, 15 Oct 2011 13:20:41 -0700
Quincey Morris wrote:
The problem is that the documentation clearly states that
exceptions must not try to escape across dispatch queue operation
boundaries. AFAICT, this means that for every one of the tiny code
block fragments I write, not only does my fragment need to be
wrapped in a '@try' block, I must also deal with the exception by
(say) logging its description before leaving the block. Every time.
That seems like an awful lot of boilerplate code, and it makes the
blocks-based approach very unpalatable.
Suppose an @try was required at all times. One logical approach
would be factor it out, instead of pasting in boilerplate code.
Factoring suggests writing a new function that takes the same args,
but which wraps the incoming block inside another block that has @try/
@catch. Just thinking out loud.
-- GG
_______________________________________________
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