IOException
From Real Software Documentation
Raised when an IO error occurs using BinaryStream, TextOutputStream, or TextInputStream.
Notes
The IOException traps errors that can occur while using the shared methods for opening and creating streams: BinaryStream.Open, BinaryStream.Create, TextOutputStream.Create, TextOutputStream.Append, and TextInputStream.Open. If you are using older APIs, you need to check the FolderItem.LastErrorCode property.
The ErrorNumber property of an IOException may be set to an OS error code. The Mac OS File Manager documentation, available at Apple Developer Connection, contains almost all error codes likely to occur in an IOException in Mac OS applications. The header file MacErrors.h is the definitive source for Mac OS error codes.
Windows error codes are available at MSDN.
Linux error codes are defined in a header file, errno.h.
Example
The following example catches an IOException if it occurs.
Dim f as FolderItem
f=GetSaveFolderItem(FileTypes1.Text,"Create Example.txt")
If f <> Nil then
t=TextOutputStream.Create(f)
t.WriteLine(TextField1.text)
t.Close
End if
Exception err as IOException
MsgBox "an IO exception occurred"
See Also
BinaryStream, RuntimeException, TextInputStream, TextOutputStream classes.
