title: do try catch swift 2
body: <p>HI i am a little confused about how to transfer if_else error handling to do try catch successfully.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>let error : NSError?
  if(managedObjectContext!.save()) {
      NSNotificationCenter.defaultCenter().postNotificationName("updateUndoState", object: nil)    
      if error != nil {
         print(error?.localizedDescription)
      }
  }
  else {
      print("abort")
      abort()
  }
  </code></pre>
  
  <p>and now i converted to swift 2.0 like this</p>
  
  <pre><code>do {
     try managedObjectContext!.save()
  }
  catch {
       NSNotificationCenter.defaultCenter().postNotificationName("updateUndoState", object: nil)
       print((error as NSError).localizedDescription)
  }
  </code></pre>
  
  <p>I am confused about where to print abort and do the abort() function</p>
  
  <p>Any idea~? Thanks a lot</p>