title: NSSetUncaughtExceptionHandler not firing in Swift 3?
body: <p>I'm trying to catch all NSExceptions in a Swift3 program - have been following <a href="https://stackoverflow.com/questions/25441302/how-should-i-use-nssetuncaughtexceptionhandler-in-swift/31770435#31770435">this Stack Overflow answer</a></p>
  
  <p>So I've got this:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      NSSetUncaughtExceptionHandler { exception in
          print("EXCEPTION CAUGHT HERE....")
          print(exception)
          print(exception.callStackSymbols)
      }
  
      // force NSException
      let array = NSArray()
      _ = array.object(at: 99)
  
  }
  </code></pre>
  
  <p>but the exception's not being called 
  Instead I get this output:</p>
  
  <blockquote>
    <p>2016-09-04 14:49:14.252 catchAllErrorsTest[8126:164827] Failed to set
    (contentViewController) user defined inspected property on (NSWindow):
    *** -[__NSArray0 objectAtIndex:]: index 99 beyond bounds for empty NSArray</p>
  </blockquote>
  
  <p>I also tried putting the exception into AppDelegate (in applicationWillFinishLaunching and applicationDidFinishLaunching), but same result</p>