title: Catching NSException in Swift
body: <p>The following code in Swift raises NSInvalidArgumentException exception:</p>
  
  <pre><code>task = NSTask()
  task.launchPath = "/SomeWrongPath"
  task.launch()
  </code></pre>
  
  <p>How can I catch the exception? As I understand, try/catch in Swift is for errors thrown within Swift, not for NSExceptions raised from objects like NSTask (which I guess is written in ObjC). I'm new to Swift so may be I'm missing something obvious...</p>
  
  <p><strong>Edit</strong>: here's a radar for the bug (specifically for NSTask): <a href="http://openradar.appspot.com/22837476" rel="noreferrer">openradar.appspot.com/22837476</a></p>