Exceptions in Objective-C are a pretty controversial issue, even Apple itself will prevent you from using them unless absolutely necessary.
My first question would be what do you want to achieve from exception handling? If you look from the point of view of Java and how much exceptions are so tightly integrated into this language for error handling (for example, flow control), I think that it is not practical to use Objective-C exceptions for this purpose, you need to use NSError errors and handle errors this way .
This is a fragment of a documentation document: -
Exceptions are resource intensive in Objective-C. You should not use exceptions for general flow control, or simply mean errors. Instead, you should use the return value of a method or function to indicate that an error has occurred, and information about the problem in the error object. For more information, see Cocoa Bug Programming Guide.
source share