The try{}catch
construct is common to C++, Java & related languages. In the iOS SDK is there and any functionality like this?
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.
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.
@try { // Try something } @catch (NSException * e) { NSLog(@"Exception: %@", e); } @finally { // Added to show finally works as well }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With