is NSException is useful for ios developer and what are the types of its Subclasses [duplicate]

StackOverflow https://stackoverflow.com/questions/10737774

  •  10-06-2021
  •  | 
  •  

Question

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.

Was it helpful?

Solution

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 NSException if 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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top