iOS异常处理

来源:互联网 发布:linux服务器安全策略 编辑:程序博客网 时间:2024/05/20 19:50

在程序中常常会遇到崩溃,我们可以通过以下两种途径来捕获崩溃信息发送到我们的服务器;这两种途径会捕获不同的崩溃信号;

途径一:

void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *);

Discussion
Sets the top-level error-handling function where you can perform last-minute logging before the program terminates.


途径二:

void    (*signal(int, void (*)(int)))(int);


具体使用参考DEMO;



0 0