|
<< Index >> |
FutureBasic |
on error fn / gosub | statement | |
|
userFunction
{(
)
} |
// optional On Error handler accepts two parameters
local fn myErr(id as long , e as long )
stop "id:" +str$ (id)+" - e:" +str$ (e)
end fn
long test
on error fn myErr
read #2, test
on error fn userFunction
syntax, then userFunction
must refer to a function which was defined or prototyped at an earlier location in the source code. The error handling function accepts two optional parameters, fileID and errorCode, but doesn't return any result.errorCode
will be set to the error code issued for the failure ( i.e. -38 is file not open, -39 end of file error, -43 file not found etc.)
See also
on error end; on error return; error function