Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

try & catch in iPhone?

The try{}catch construct is common to C++, Java & related languages. In the iOS SDK is there and any functionality like this?

like image 582
Sam007 Avatar asked Apr 18 '11 14:04

Sam007


People also ask

What is the mean of try?

1 : to make an attempt at —often used with an infinitive try to fix the car. 2a : to put to test or trial try one's luck —often used with out try out a new method. b : to subject to something (such as undue strain or excessive hardship or provocation) that tests the powers of endurance.

Is try an action verb?

verb (used with object), tried, try·ing. to attempt to do or accomplish: Try it before you say it's simple. to test the effect or result of (often followed by out): to try a new method; to try a recipe out. to endeavor to evaluate by experiment or experience: to try a new field; to try a new book.


1 Answers

@try {     // Try something } @catch (NSException * e) {     NSLog(@"Exception: %@", e);  } @finally {     // Added to show finally works as well } 
like image 80
Neil Knight Avatar answered Oct 15 '22 19:10

Neil Knight