Exception thrown in Swift by NSTask

Originator:silyevsk
Number:rdar://22837476 Date Originated:24-Sep-2015 04:14 PM
Status:Open Resolved:
Product: Product Version:
Classification: Reproducible:
 
The following code in Swift raises NSInvalidArgumentException exception:

task = NSTask()
task.launchPath = "/SomeWrongPath"
task.launch()

It should instead throw an error, since there seems to be no way to catch an exception in Swift.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!