Implementing the GetLastError Method: Reporting Errors

When the RunEx or Run method returns a result other than success or throws an exception, OpenText Functional Testing calls the GetLastError method. Implement this method to return a string that OpenText Functional Testing can display in an error message box. Ideally, the error message is in the locale of the computer running the test.

OpenText Functional Testing uses HRESULT error codes for some common errors, for example, object not found, and object not unique. These codes are defined in file <Testing_Extensibility_SDK_installdir>\SDK\include\TestError.h. If a method returns one of these error codes, and the GetLastError method does not provide an error message string, OpenText Functional Testing displays the error message defined by default for this message.

For any other error code, if the GetLastError method does not provide an error message string, OpenText Functional Testing displays an Unspecified Error message.