I have to catch the exception when SIGKILL
, SIGABRT
, Signal-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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With