• 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
Using return and goto statements in exception handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using return and goto statements in exception handler


  • Subject: Using return and goto statements in exception handler
  • From: Frode <email@hidden>
  • Date: Tue, 27 Jun 2006 17:47:02 +0200

Hi!

I'm compiling for Mac OS X 10.2 and have added compability code for @try/@catch/@final blocks with NS_DURING/NS_HANDLER/NS_ENDHANDLER.

Is it natural to use return (and goto) statements within the section of code between NS_HANDLER and NS_ENDHANDLER? I'm asking because it is not until now I realize that NS_VALUERETURN and NS_VOIDRETURN are only intent for the exception domain (section of code between NS_DURING and NS_HANDLER).

The Apple documentation only discuss this briefly, but with the trivial definition of NS_ENDHANDLER in NSException.h, together with the standard way setjmp related exception executes between if-else blocks, one is rather suppose to use return and goto.

Thanks for any clarifications.

Regards
Roger

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Using return and goto statements in exception handler
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Simplest Dongle Method? Making a file uncopyable on CD?
  • Next by Date: Re: Distributed Objects and Bonjour
  • Previous by thread: how do get contentView of a NSOpenPanel and run it inside another window?
  • Next by thread: Re: Using return and goto statements in exception handler
  • Index(es):
    • Date
    • Thread