Use LastErrorCode property to get the numerical code of a error occurred. Use debug mode to automatically get error descriptions in Messages window.
List of possible error codes depends on the actual Automation object being used. See documentation for that object.
Use LastError property to get the textual description of a error occurred.
Two types of errors might occur with VbScriptXtra depending who detects error condition either VbScriptXtra or wrapped COM Automation object. For example type casting routine of VbScriptXtra might return a error in case it cannot typecast Lingo value into COM Automation value. This is a VbScriptXtra-level error. LastErrorCode returns -1 in this case.
The other type of errors occures inside COM library or a wrapped object. I this case LastErrorCode returns the value provided by COM library or wrapped object.
If the last call was successful, then LastErrorCode returns 0.
See Debugging for related information.
|