Possible Duplicate:
iphone – try, catch question
please tell me that using @try @catch is useful for ios development .
i want to know about the child classes of NSException.
please give me the link to understand it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well you have missed a part @finally which is the code segment which runs whether the exception is thrown or not and if it is not present the code block after catch block is run.Also, people generally don’t use @throw to throw the exceptions.
Anyway it is advisable to use
NSExceptionif are already aware of your exceptions , you can create and raise the exceptions.You can have a look at NSException Apple’s Reference and About Exceptions and Errors