title: how to print error in catch
body: <pre><code>catch let error as LocksmithError{
  print(error)// it would print the case of the error.
  }
  </code></pre>
  
  <p>However if I do</p>
  
  <pre><code>catch LocksmithError.Duplicate{
  
  }
  
  catch{
  print (LocksmithError) // Obviously I would just print LocksmithError, it won't print the case
  print (LocksmithError.rawValue) // prints nothing
  }
  </code></pre>
  
  <p><strong>My question is:</strong> Using the 2nd approach is there any that I can actually retrieve and the value/case of the error? Or if I don't get the value right at the entry point ie the catch, then I miss the chance of doing it!</p>