     public func controllerDidChangeContent(controller: NSFetchedResultsController) {
         self.tableView.endUpdates()
     }
-    
+
 }

import York_Swift_Try_Catch

public class FetcherDataSource<CellType: UITableViewCell, EntityType: NSManagedObject>: NSObject, NSFetchedResultsControllerDelegate, UITableViewDataSource {
    
    // MARK: - Properties
    
    public let tableView:UITableView
    public private(set) var entityName: String
    public var predicate: NSPredicate? {
        didSet {

                let error = NSError(domain: "", code: 9999, userInfo: exception.userInfo)
                self.logger.logError(error)
        }
    }

    public func objectAtIndexPath(indexPath: NSIndexPath) -> EntityType {
        return self.fetchedResultsController.objectAtIndexPath(indexPath) as! EntityType
    }

    public func indexPathForObject(object: EntityType) -> NSIndexPath? {
        return self.fetchedResultsController.indexPathForObject(object)
    }


    // MARK: - Table View Data Source

    public func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return self.fetchedResultsController.sections?.count ?? 0
    }
