title: Swift 2.0 Type '()' does not conform to protocol
body: <p>I'm implementing this method while using the camera in a <code>view controller</code></p>
  
  <pre><code>let captureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo)
  
  //... code
  if let device = captureDevice {
              do {
                  if (try device.lockForConfiguration()) {
                      device.focusPointOfInterest = focusPoint
                      device.focusMode = AVCaptureFocusMode.ContinuousAutoFocus
                      device.exposurePointOfInterest = focusPoint
                      device.exposureMode = AVCaptureExposureMode.ContinuousAutoExposure
                      device.unlockForConfiguration()
                  }
              }
              catch {
                  print("Error")
              }
          }
  //... code
  </code></pre>
  
  <p>Trying to convert to <code>Swift 2.0</code> I found this error <code>Type '()' does not conform to protocol to 'BooleanType'</code> at line </p>
  
  <pre><code>if (try device.lockForConfiguration())
  </code></pre>
  
  <p>Actually I'm trying to figure out how to solve this, how can I make this a <code>'BooleanType'</code>? In <code>Swift 1.2</code> my code was simply</p>
  
  <pre><code>if (device.lockForConfiguration())
  </code></pre>
  
  <p>Thanks in advance.</p>