title: 'no calls to throwing functions occur within 'try' expression [warning] in swift 3
body: <p>I'm trying to delete an object from core data and I tried it within try catch as below.</p>
  <pre><code>do {
     try self.managedContext.deleteObject(self.productList[indexPath.row])
  } catch let error as NSError {
          print(&quot;something wrong with the delete : \(error.userInfo)&quot;)
  }
  </code></pre>
  <p>it say <code>'no calls to throwing functions occur within 'try' expression</code> and <code>'catch block is unreachable because no errors are throw in 'do' block</code>. following image give you more idea.</p>
  <p><a href="https://i.stack.imgur.com/UP4Rs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UP4Rs.png" alt="enter image description here" /></a></p>
  <p>why is this. I have no idea. how to solve this. hope your help.</p>