• 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: Blocks vs. life, the universe and everything
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Does XCode 3.2 Documentation Browser Stink?
  • Next by Date: 'Customize Toolbar...' menu item disabled
  • Previous by thread: Re: Blocks vs. life, the universe and everything
  • Next by thread: How to create pdf with alpha
  • Index(es):
    • Date
    • Thread