• 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 statement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: try statement


  • Subject: Re: try statement
  • From: Chris Ridd <email@hidden>
  • Date: Tue, 20 May 2003 09:34:41 +0100

On 20/5/03 9:13 am, Lorenzo <email@hidden> wrote:

> I attempted to use the "try" statement in my Cocoa application
>
> try{
> //I do something here;
> }
> catch (Exception result) {
> //I do other things here;
> }
>
> But whatever I write inside the braquets
> the compiler says everytime:
> illegal statement, missing `;' after `try'
>
> I remember in Carbon I used that some way,
> so please what did I forget?
> And how to get the error with catch?
>
>
> Best Regards

Objective-C doesn't support that syntax, though Objective-C++ does. Are you
compiling a .m or a .mm file?

Cocoa uses NS_DURING, NS_HANDLER and NS_ENDHANDLER macros for exception
handling.

Cheers,

Chris
_______________________________________________
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 statement (From: Lorenzo <email@hidden>)

  • Prev by Date: try statement
  • Next by Date: Re: the art of #includes
  • Previous by thread: try statement
  • Next by thread: Re: try statement
  • Index(es):
    • Date
    • Thread