Handling errors
The lastError attribute of the Connection part contains data about the most recent error that occurred on a communications operation. If there have been no errors, the lastError attribute has a value of nil.
To access the error information, tear off the lastError attribute. The resulting error part has attributes representing the following information:
returnCode
The numerical return code returned by the communications software.
codesAsStrings
The textual error message associated with the return code.
Other attributes of the error part provide information specific to the communication protocol you are using.
Your application can use the error part to handle errors in any of several ways:
By making a connection from returnCode to an error-handling script, you can cause error-handling logic to run each time a new error occurs.
You can display the text of the error message to the user by connecting codesAsStrings to the object attribute of a label or a data entry field in a window.
Last modified date: 01/29/2015