errorInfo = error
This function returns information about the most recent disk IO error encountered in your program. It relates only to IO errors in the FutureBasic runtime; it does not include string errors, numeric errors, or error codes returned by MacOS Toolbox functions.
error function returns an OSStatus value such as 0 (
_noErr), -35 (
_nsvErr), -43 (
_fnfErr), -5000 (
Note that these kinds of errors will normally cause your program to stop executing. If you want to trap and handle these errors within your program, you must use the
on error fn and
on error end statements.
After retrieving the error information with the
error function, you should reset FutureBasic's internal error register by executing the
error = _noErr statement.
error statement; on error fn; on error gosub