How to print error in Swift code?
<p>I have the following code:</p>

<pre><code>     func marseJSON(Person: String)
{


    let jsonData1 = NSData(contentsOfURL: NSURL(string: "\(label2)")!) as NSData!

    var error : NSError?
    let ReadableJSON1 = JSON ( data:jsonData1, options: NSJSONReadingOptions.MutableContainers, error: &amp;error )

  //  print(error)

   LabelText1.text = "There is a problem with the qr code! or simply error"
</code></pre>

<p>I have a function which reads a QR code, the problem is that this QR code should be always a link from my server. Would you please show me how can I display an error message into the  LabelText1.text if the user does not scan the right QR code for my server.
I have tried by myself but I am new in swift and it seems that the syntax is wrong. </p>