I am using an exception handler in my AppDelegate.
NSSetUncaughtExceptionHandler(&HandleExceptions);
I can get the backtrace of the exception by using NSException
's callStackSymbols
It gives the following details.
0 CoreFoundation 0x01cfe02e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x011e2e7e objc_exception_throw + 44
2 CoreFoundation 0x01cb3b44 -[__NSArrayI objectAtIndex:] + 196
3 LogError 0x000047c5 -[ViewController crashIt:] + 133
4 libobjc.A.dylib 0x011f6705 -[NSObject performSelector:withObject:withObject:] + 77
and much more.
I can get the class name, method name from this. But I can't find the line number, where the exception raised actually. Is there a way to get the line number from the backtrace or somewhere else?