Objective c can not catch exception from calling super method-Collection of common programming errors
I am calling a super method from my subclass. But sometimes the object of the superclass (UIWindow) is nil so it will fail. I try to catch the exception but it doesn´t work. The app still crashes. Can anyone tell me why and how I can fix this?
- (void)sendEvent:(UIEvent *)event;
{
@try {
[super sendEvent:event];
}
@catch(NSException *e) {
NSLog(@"%@",e);
return;
}
Thanks a lot