Is it possible to get which class thrown the exception at runtime?
If so, then how to do it?
What I want to do is to detect which class did throw the exception. I'm using NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *) to detect if my app crashes. With that, I have the NSException and I want to know which class throws it.
Also, it is not for debugging purposes.
#pragma mark - Exception Handler
void HandleException(NSException *exception)
{
// Handle exception
}
void InstallUncaughtExceptionHandler()
{
NSSetUncaughtExceptionHandler(&HandleException);
//signal(SIGSYS, SIG_DFL);
for(int x = 1; x <= 30; x++)
{
signal(x, SIG_DFL);
}
}