GetLastError
Listed below is the syntax, description, parameter and return value for "GetLastError."
Method Syntax: return_value = GetLastError()
Description: This method requests the error code for the current error state of the API Instance. If a SCO calls this method, the API Instance shall not alter the current error state, but simply return the requested information.
A best practice recommendation is to check to see if a session method or data-transfer method was successful. The GetLastError() can be used to return the current error code. If an error was encountered during the processing of a function, the SCO may take appropriate steps to alleviate the problem.
Parameter: The API method shall not accept any parameters.
Return Value: The API Instance shall return the error code reflecting the current error state of the API Instance. The return value shall be a characterstring (convertible to an integer in the range from 0 to 65536 inclusive) representing the error code of the last error encountered.