Communications/Transactions Guide and Reference

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:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]