iOS + How to catch unhandled exception

后端 未结 3 1013
生来不讨喜
生来不讨喜 2021-02-19 06:37

We are writing static library. We have done exception handling for the exposed APIs. But still there are few un-handled Exceptions (or OS Exceptions). Can you please let me know

3条回答
  •  我寻月下人不归
    2021-02-19 07:13

    Simple -

           @try
            {
                 //your code
            }
            @catch (NSException *theException) 
            {
                NSLog(@"Exception: %@", theException);
            }
    

    Happy coding ...

提交回复
热议问题