[swift-users] file io in Swift 2.2 for Linux (would like to be pointed in the right direction)

Brent Royal-Gordon brent at architechies.com
Tue Jun 7 09:34:37 CDT 2016


>> It’s almost unique in that regard; in general Cocoa APIs are only supposed to throw exceptions for programmer errors like assertion failures.
> 
> Almost unique is right.  The only other offender I can think of is Distributed Objects, which is even less fun because any method call (including property accesses) on any proxied object can throw language exceptions.

The docs only touch on it, but `-[NSTask launch]` throws an Objective-C exception "if it fails to create a process", which is something which can be very difficult to prevent through ahead-of-time checks.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-users mailing list