diff --git a/BrowserMatrix.m b/BrowserMatrix.m index b6acf57cb6..fedf4ff735 100644 --- a/BrowserMatrix.m +++ b/BrowserMatrix.m @@ -18,6 +18,7 @@ #import "ThreadsManager.h" #import "NSThread+N2.h" #import "N2Stuff.h" +#import "N2Debug.h" static NSString *albumDragType = @"Osirix Album drag"; @@ -166,8 +167,8 @@ - (void) startDrag:(NSEvent *) event slideBack:YES]; } - } @catch( NSException *localException) { - NSLog(@"Exception while dragging: %@", [localException description]); + } @catch( NSException *e) { + N2LogException( e); } } @@ -214,6 +215,7 @@ - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination } @catch ( NSException * e) { + N2LogException( e); } avoidRecursive = NO; } @@ -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); } } } @@ -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]; @@ -335,6 +339,10 @@ - (void) mouseDown:(NSEvent *)event } [NSEvent stopPeriodicEvents]; + } + @catch ( NSException *e) { + N2LogException( e); + } } [self.window makeFirstResponder: self];