Ticket #1633: GroupsController.diff

File GroupsController.diff, 841 bytes (added by laurris, 12 years ago)

svn diff of GroupsController?.m

  • GroupsController.m

     
    426426
    427427- (BOOL) torrent: (Torrent *) torrent doesMatchRulesForGroupAtIndex: (NSInteger) index
    428428{
    429     if (![self usesAutoAssignRulesForIndex: index])
     429        NSPredicate * predicate = [self autoAssignRulesForIndex: index];
     430    if (predicate == nil)
    430431        return NO;
    431432       
    432         NSPredicate * predicate = [self autoAssignRulesForIndex: index];
    433         return [predicate evaluateWithObject: torrent];
     433        BOOL eval;
     434       
     435        @try {
     436                eval = [predicate evaluateWithObject:torrent];
     437        }
     438        @catch (NSException * e) {
     439                NSLog(@"%@ : Error when evaluating predicate *%@*", [e description], [predicate description]);
     440                eval = NO;
     441        }
     442        @finally {
     443                return eval;
     444        }
    434445}
    435446
    436447@end