FileHandle un-catchable exceptions in Swift Bridged API
||Product Version:||7 8.1 8.2 8.3|
NSFileHandle and bridged FileHandle uses exceptions for error handling. Currently in swift there is no faculty to catch from of these recoverable/un recoverable conditions
Steps to Reproduce:
1 use Filehandle API
2 use Filehandle API incorrectly or have an error condition occur (full disk, exhaust file descriptors etc
FileManager.default.createFile(atPath: "test", contents: nil, attributes: nil)
let handle = FileHandle(forWritingAtPath: "test")!
expect to be able to catch and respond to errors. either crash gracefully in unrecoverable conditions or prevent crashes in recoverable conditions.
code crashes due to uncaught exception
Any Swift + Foundation combination with FileHandle API
'Test.playground.zip' was successfully uploaded.
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!