title: Cannot convert value of type () to expected argument type bool (Swift)?
body: <p>I have the following code:</p>
  
  <pre><code>func saveContext () {
      var error: NSError? = nil
      let managedObjectContext = self.managedObjectContext
      if managedObjectContext != nil {
          if managedObjectContext.hasChanges &amp;&amp; !managedObjectContext.save(){
              abort()
          }
      }
  }
  </code></pre>
  
  <p>I got two errors: call can throw, but not marked with try and the error is not handled. The other one says cannot convert value of type () to expected argument type 'Bool'. </p>
  
  <p>How can I fix this?</p>