GetLastError |
Syntax:
GetLastError()
Description:
Returns the error code of the previously executed step. An error number is returned that uniquely identifies the error. Use this along with the GetLastErrorText extended function to return a textual description of the error that corresponds to the error number. An error code of 0 indicates the last step executed successfully.
This extended function is essential as it can perform conditional-based executions based on the error generated. For example, if error code 100 is returned, skip to step 10. If error code 200 is returned, skip to the last step did not generate an error GetLastError returns 0.
NOTE: This extended function returns errors generated by way of AML only - it does not recognize errors with BASIC functions or methods.
Parameters:
(No parameters required)
Example:
Sub
Main
MsgBox GetLastError()
EndSub
See Also:
GetLastStepExecutionTimeMin, GetLastStepExecutionTimeMS, GetLastStepExecutionTimeSec, GetTaskExecutionTimeMin, GetTaskExecutionTimeMS, GetTaskExecutionTimeSec