• 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: @try and @catch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @try and @catch


  • Subject: Re: @try and @catch
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 15 Nov 2003 18:32:06 -0800

On Nov 15, 2003, at 9:55 AM, Karl Kraft wrote:

I recently had to catch an exception in a project that has been moved to 10.3 and XCode, and have some questions about @try and @catch;

0) The only documentation I can find on these features is

file:///Developer/Documentation/Cocoa/Conceptual/ObjectiveC/ 3objc_language_overview/chapter_3_section_9.html

Is there anything else I should read or view to become more familiar with these new features?

Don't know myself... it would be nice to have better docs.

The @try/@catch/@finally (also note @syncronized) work very much (can I say exactly?) like those found in Java. So reading up on those may help fill in documentation holes.

1) In order to use the new exception handling method you need to pass an additional flag to the compiler. Is there a predefined build setting for this, or should I just stick it in EXTRA_CFLAGS

I set my project to target 10.3 and that was all I did.

2) Can code with @try/@catch be cross-compiled back to 10.2 or 10.1, or is this a 10.3 feature only?

No. The objective-c runtime support doesn't exist prior to 10.3 to my knowledge.

3) The old exception handling (NS_DURING, NS_HANDLER) did not allow you to return from the method inside the handler unless you used NS_VOIDRETURN or NS_VALUERETURN. Is this still the case with the new exception handling, or can I just use the normal return?

Normal return.

-Shawn
_______________________________________________
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.

References: 
 >@try and @catch (From: Karl Kraft <email@hidden>)

  • Prev by Date: Re: @try and @catch
  • Next by Date: Re: Quartz 2D drawing problems
  • Previous by thread: Re: @try and @catch
  • Next by thread: Identifying unique login sessions
  • Index(es):
    • Date
    • Thread