diff --git a/Application/AppController.m b/Application/AppController.m index e4eda4201..acd0e27d8 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -888,7 +888,7 @@ static BOOL consentLastEnabled = NO; @try { [playlistView selectRowIndexes:[NSIndexSet indexSetWithIndex:pe.index] byExtendingSelection:NO]; } - @catch(id anException) { + @catch(NSException *e) { } } diff --git a/Audio/AudioPlayer.m b/Audio/AudioPlayer.m index 38a6c0104..1c8c5c432 100644 --- a/Audio/AudioPlayer.m +++ b/Audio/AudioPlayer.m @@ -422,8 +422,8 @@ } } } - @catch(id anException) { - DLog(@"Exception thrown checking file match: %@", anException); + @catch(NSException *e) { + DLog(@"Exception thrown checking file match: %@", e); } } diff --git a/Audio/Plugin.h b/Audio/Plugin.h index c88eeb942..ef31333b1 100644 --- a/Audio/Plugin.h +++ b/Audio/Plugin.h @@ -111,7 +111,7 @@ static NSString *guess_encoding_of_string(const char *input) { @try { ret = [NSString stringWithUTF8String:input]; } - @catch(id anException) { + @catch(NSException *e) { // This method is incredibly slow NSData *stringData = [NSData dataWithBytes:input length:strlen(input)]; [NSString stringEncodingForData:stringData encodingOptions:nil convertedString:&ret usedLossyConversion:nil]; diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index a9f756cc5..c61fe26f1 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -969,15 +969,15 @@ static void *playlistControllerContext = &playlistControllerContext; @try { [super insertObjects:objects atArrangedObjectIndexes:indexes]; } - @catch(id anException) { + @catch(NSException *e) { // Even further bodge fix @try { count = [[self arrangedObjects] count]; indexes = [NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(count, [objects count])]; [super insertObjects:objects atArrangedObjectIndexes:indexes]; } - @catch(id anException) { - DLog(@"Exception thrown adding tracks to the playlist: %@", anException); + @catch(NSException *e) { + DLog(@"Exception thrown adding tracks to the playlist: %@", e); } } diff --git a/Playlist/PlaylistLoader.m b/Playlist/PlaylistLoader.m index a992666b6..4ac0f1bbc 100644 --- a/Playlist/PlaylistLoader.m +++ b/Playlist/PlaylistLoader.m @@ -402,9 +402,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc [pathTask finish]; } - @catch(id anException) { - DLog(@"Exception caught while processing path: %@", anException); - [SentrySDK captureException:anException]; + @catch(NSException *e) { + DLog(@"Exception caught while processing path: %@", e); + [SentrySDK captureException:e]; [pathTask finishWithStatus:kSentrySpanStatusInternalError]; } @@ -518,9 +518,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc pathTask = nil; } } - @catch(id anException) { - DLog(@"Exception caught while processing for containers: %@", anException); - [SentrySDK captureException:anException]; + @catch(NSException *e) { + DLog(@"Exception caught while processing for containers: %@", e); + [SentrySDK captureException:e]; if(innerTask) { [innerTask finishWithStatus:kSentrySpanStatusInternalError]; } @@ -600,9 +600,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc [fileTask finish]; } - @catch(id anException) { - DLog(@"Exception caught while filtering paths: %@", anException); - [SentrySDK captureException:anException]; + @catch(NSException *e) { + DLog(@"Exception caught while filtering paths: %@", e); + [SentrySDK captureException:e]; if(fileTask) { [fileTask finishWithStatus:kSentrySpanStatusInternalError]; } @@ -657,9 +657,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc [containedUrlTask finish]; } - @catch(id anException) { - DLog(@"Exception caught filtering contained URL: %@", anException); - [SentrySDK captureException:anException]; + @catch(NSException *e) { + DLog(@"Exception caught filtering contained URL: %@", e); + [SentrySDK captureException:e]; if(containedUrlTask) { [containedUrlTask finishWithStatus:kSentrySpanStatusInternalError]; } @@ -926,9 +926,9 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path); [childTask finish]; } } - @catch(id anException) { - DLog(@"Exception thrown while reading tags: %@", anException); - [SentrySDK captureException:anException]; + @catch(NSException *e) { + DLog(@"Exception thrown while reading tags: %@", e); + [SentrySDK captureException:e]; if(childTask) { [childTask finishWithStatus:kSentrySpanStatusInternalError]; } @@ -1074,9 +1074,9 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path); [childTask finish]; } } - @catch(id anException) { - DLog(@"Exception thrown while reading tag synchronously: %@", anException); - [SentrySDK captureException:anException]; + @catch(NSException *e) { + DLog(@"Exception thrown while reading tag synchronously: %@", e); + [SentrySDK captureException:e]; if(childTask) { [childTask finishWithStatus:kSentrySpanStatusInternalError]; }