I want to use global exception handler.
Call in applicationdidFinishLaunchingWithOptions this:
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
And use this for handling exception:
void uncaughtExceptionHandler(NSException *exception) {
// handling exception
}
But also I use sdk, which already uses NSSetUncaughtExceptionHandler. Then my method uncaughtExceptionHandler hasn't called when exception is happens.
I know that can be only one handler for one app. But I need that and sdk, and this code can handle exceptions on global level.
Do you have any ideas how I can use NSSetUncaughtExceptionHandler in this case? Or other ideas how I can handle exceptions on global level? Great thanks.
Aucun commentaire:
Enregistrer un commentaire