开发者

How to Handle SIGKILL,SIGABRT, Signal-0 exceptions through Exception Handling in iPhone programming

I have to catch the exception when SIGKILL, SIGABRT, Si开发者_高级运维gnal-0 exceptions are raised.

Please Suggest how to handle the above Signals through Exception handling.

Can you please suggest me any sample code to do this?

Thanks in advance.


You can catch most of the unhandled exceptions by registering an NSUncaughtExceptionHandler in your app delegate.

Similarly you can trap most of the signals using sigaction or signal

As you can see in both above links, you can not catch signals of type SIGKILL and SIGSTOP.

try analyzing your code for any possible reasons that cause these signals.


developers with java and C# background are bound to go for exception handling in iOS. Apple has some really good API's to solve the known errors but the program should be made exception free(which i know is difficult). Sigabrt usually occurs when u over release a object and SIGKILL usually occurs when the systems kills your app due to lack of memory. So, i suggest you to read the memory management guide by apple . Also, you can go through this link and this. . Apple has a class defined for exception handling - NSException.

also TRY TO IMPROVE YOUR ACCEPTANCE RATE.

Good luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜