diff options
author | Max <post@wickenrode.com> | 2016-03-14 00:59:35 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2016-03-14 00:59:35 +0100 |
commit | 89bda16ba81f4826f27d14dfb2c1a20aa5f95fa8 (patch) | |
tree | 541ff7cdc3f6722694f4a39eacb3dd847fc80714 /Source | |
parent | 3900082a2a4ecd102f7b541cad2fdc6d8212b111 (diff) | |
download | sequelpro-89bda16ba81f4826f27d14dfb2c1a20aa5f95fa8.tar.gz sequelpro-89bda16ba81f4826f27d14dfb2c1a20aa5f95fa8.tar.bz2 sequelpro-89bda16ba81f4826f27d14dfb2c1a20aa5f95fa8.zip |
Add some debug code for #2445
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableView.m | 16 |
1 files 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]; + } } /** |