I am using NSFileHandle's fileHandleForWritingAtPath to open a handle to a file and write into it (append to the end of it). Since I always need to write into it I never close the handle or check that it's there when writing into it.
I need to support a case were for some reason a third party came and deleted the file, that is I have a valid handle that is going into a file that is no longer there (the kernel should know the handle is bad). Anticipating this I wrap the call to writeData: with a try catch, I expect the method to throw an exception (why does it return void and not written bytes is beyond me).
It does not. Why?