title: Correct handling of NSJSONSerialization (try catch) in Swift (2.0)?
body: <p>arowmy init works fine in Swift &lt; 2 but in Swift 2 I get a error message from Xcode <code>Call can throw, but it is not marked with 'try' and the error is not handled</code> at <code>let anyObj = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers) as! [String:AnyObject]</code>. I think in my case I can´t use a try catch block because super is not initialized at this time.  "Try" need a function that throws. </p>
  
  <p>here is my function:</p>
  
  <pre><code>required init(coder aDecoder : NSCoder)
  {
      self.name  = String(stringInterpolationSegment: aDecoder.decodeObjectForKey("name") as! String!)
      self.number = Int(aDecoder.decodeIntegerForKey("number"))
      self.img = String(stringInterpolationSegment: aDecoder.decodeObjectForKey("image") as! String!)
      self.fieldproperties = []
  
      var tmpArray = [String]()
      tmpArray = aDecoder.decodeObjectForKey("properties") as! [String]
  
  
      let c : Int = tmpArray.count
      for var i = 0; i &lt; c; i++
      {
          let data : NSData = tmpArray[i].dataUsingEncoding(NSUTF8StringEncoding)!
  
           // Xcode(7) give me error: 'CAll can thorw, but it is not marked with 'try' and the error is not handled'
          let anyObj =  NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers) as! [String:AnyObject]
  
          let label = anyObj["label"] as AnyObject! as! String
          let value = anyObj["value"] as AnyObject! as! Int
          let uprate = anyObj["uprate"] as AnyObject! as! Int
          let sufix = anyObj["sufix"] as AnyObject! as! String
  
          let props = Fieldpropertie(label: label, value: value, uprate: uprate, sufix: sufix)
          self.fieldproperties.append(props)
      }
  }
  </code></pre>
  
  <p>Xcode mean that:
  <code>let anyObj = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers) as! [String:AnyObject]</code></p>
  
  <p>but I have no idea to do here the right think according to this document <a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/ErrorHandling.html" rel="nofollow noreferrer">https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/ErrorHandling.html</a></p>