Xcode7: How to mail crash report in swift
<p>My small task is, how to mail crash report? I don't know whether this example is right or wrong.</p>

<p><strong>Coding:</strong></p>

<pre><code>override func viewDidLoad() {
        super.viewDidLoad()

        func exceptionHandler(exception : NSException) {
            print("\n\n \(exception)")
            print("\n\n \(exception.callStackSymbols)")


            mailAcn() // SENDING MAIL ACTION WHEN EXCEPTION CAUGHT
        }

        NSSetUncaughtExceptionHandler(exceptionHandler) //Error: A C Function pointer cannot be formed from a local function captures context


        // Do any additional setup after loading the view, typically from a nib.
    }
</code></pre>

<p>I am following this link,, 
<a href="https://stackoverflow.com/questions/32952611/how-to-use-nssetuncaughtexceptionhandler-to-show-exception-message-on-uiview-in">How to use NSSetUncaughtExceptionHandler to show exception message on UIView in Swift</a></p>

<p>Some unknown error is receiving. Kindly guide me, how to solve this?</p>