From 89bda16ba81f4826f27d14dfb2c1a20aa5f95fa8 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 14 Mar 2016 00:59:35 +0100 Subject: Add some debug code for #2445 --- Source/SPTableView.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/SPTableView.m b/Source/SPTableView.m index 84e43a26..df48a407 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -190,8 +190,7 @@ return; } else { - [super keyDown:theEvent]; - return; + goto pass_keyDown_to_super; } } @@ -227,8 +226,17 @@ return; } - - [super keyDown:theEvent]; + +pass_keyDown_to_super: + @try { + [super keyDown:theEvent]; + } + @catch (NSException *ex) { + // debug code for #2445 + NSString *ownId = [NSString stringWithFormat:@"%@(%@)",self,([self respondsToSelector:@selector(identifier)]? [self identifier] : @"-N/A-")]; + [NSException raise:NSInternalInconsistencyException + format:@"%s: passing event to super failed! (issue #2445)\n\nOriginal exception:\n%@\n\nEvent:\n %@\nDelegate:\n %@\nself:\n %@",__PRETTY_FUNCTION__,ex,theEvent,[self delegate],ownId]; + } } /** -- cgit v1.2.3