Skip to content

Commit

Permalink
catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
rossetantoine committed Jan 24, 2014
1 parent 6b1dde3 commit c989832
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions BrowserMatrix.m
Expand Up @@ -18,6 +18,7 @@
#import "ThreadsManager.h"
#import "NSThread+N2.h"
#import "N2Stuff.h"
#import "N2Debug.h"

static NSString *albumDragType = @"Osirix Album drag";

Expand Down Expand Up @@ -166,8 +167,8 @@ - (void) startDrag:(NSEvent *) event
slideBack:YES];
}

} @catch( NSException *localException) {
NSLog(@"Exception while dragging: %@", [localException description]);
} @catch( NSException *e) {
N2LogException( e);
}
}

Expand Down Expand Up @@ -214,6 +215,7 @@ - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
}
@catch ( NSException * e)
{
N2LogException( e);
}
avoidRecursive = NO;
}
Expand Down Expand Up @@ -277,8 +279,8 @@ - (void) startDragOriginalFrame:(NSEvent *) event
source:self
slideBack:YES];

} @catch( NSException *localException) {
NSLog(@"Exception while dragging frame: %@", [localException description]);
} @catch( NSException *e) {
N2LogException( e);
}
}
}
Expand All @@ -304,11 +306,13 @@ - (void) mouseDown:(NSEvent *)event
}
@catch (NSException *e)
{
NSLog( @"[NSEvent startPeriodicEventsAfterDelay: 0 withPeriod:0.001] : %@", e);
N2LogException( e);
}
NSDate *start = [NSDate date];
NSEvent *ev = nil;

@try
{
do
{
ev = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask | NSPeriodicMask];
Expand All @@ -335,6 +339,10 @@ - (void) mouseDown:(NSEvent *)event
}

[NSEvent stopPeriodicEvents];
}
@catch ( NSException *e) {
N2LogException( e);
}
}

[self.window makeFirstResponder: self];
Expand Down

0 comments on commit c989832

Please sign in to comment.