getError
Top  Previous  Next

err = getError ( )

Use this function to retrieve the code of the last error occurred during execution of the script.

Parameters
 
None  
 
Return value
 
The code of the last error. Can be one of the following values:  
 
ERR_OK
the function was executed successfully.
ERR_FAILED
unrecognized error occurred during the function execution.
ERR_CANCEL
the interactive function was cancelled by user.
ERR_NOTFOUND
the specified file, directory or port as not found.
ERR_BADFORMAT
the specified file has an unrecognized format.
ERR_BADFILE
the specified file could not be open.
ERR_NOSPACE
no space on the device to perform the operation.
ERR_TIMEOUT
timeout occurred during the execution of the function.
 
 
Example
 
serialOpen (1)  
serialWait(10000)  
If getError()=ERR_TIMEOUT Then  
Print "Timeout occurred"  
Else   
Print serialRead()  
End If  
serialClose()