title: Fetch request in Swift 2.1.1
body: <p>I'm trying to convert my Swift 1 code into Swift 2.1.1 code.
  So I am trying to add a fetchRequest.</p>
  
  <p>In Swift 1 I did this:</p>
  
  <pre><code>if let results = context.executeFetchRequest(fetchRequest, error:&amp;error), 
     let managedObject = results.first as? NSManagedObject {
         context.deleteObject(managedObject)
      }
  
  let saveError: NSError?
  context.save(nil)
  </code></pre>
  
  <p>and </p>
  
  <pre><code> var error: NSError?
   let fetchedResults = managedContext.executeFetchRequest(fetchRequest) as! [NSManagedObject]?
   if let results = fetchedResults {
        people = results
     } 
     else {
        print("Could not fetch \(error), \(error!.userInfo)")
     }
  </code></pre>
  
  <p>Swift 2.1 (2nd request -> doesn't work):</p>
  
  <pre><code>do {
    let fetchedResults = try managedContext.executeFetchRequest(fetchRequest) as! [NSManagedObject]
     // success if it gets here
     if let results = fetchedResults {
          people = results
      }
   } catch let error as NSError {
      // failed so print error
      print("Error: \(error.localizedDescription)")
   }
  </code></pre>
  
  <p>Errors in line (<code>if let results... &amp; let fetchedResults...</code>):</p>
  
  <pre><code>Initializer for conditional binding must have Optional type, not '[AnyObject]'
  </code></pre>
  
  <p><code>Call can throw, but is not marked with 'try' and the error is not handled</code></p>
  
  <p>Errors in line (<code>let fetchedResults...</code>):</p>
  
  <p><code>Call can throw, but is not marked with 'try' and the error is not handled</code></p>
  
  <p><code>Cannot downcast from '[AnyObject]' to a more optional type '[NSManagedObject]?'</code></p>
  
  <p>Could you please help me to translate this into Swift 2.1.1? 
  Thanks for your help!</p>