Re: try statement
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.