AMError

Description

When a task generates an error, it automatically creates a dataset called AMError. This dataset can be used within a task to determine specific facts and characteristics about the error that occurred, including unique error number, error description, step number that generated the error and more. If a subtask fails, AMError values can be passed to the parent task. If the task that failed is part of a workflow, AMError information can be passed to any task or an Evaluation object  succeeding the task that failed.

AMError is a standard Automate Desktop dataset that contains a single row of data. It can be used much like the datasets created by the Database - SQL query and E-Mail activities. The fields of AMError can be used to examine properties of the specific error in order to determine task failure. For example, using a Dialog - Message activity with the Message to display parameter set to %AmError.ErrorDesc% would display a message box during task execution returning a textual description of the error.

Related Topics 

Parameters

Every instance of AMError is populated with the following fields:  

Name Type Return Value
AMError.ErrorDesc String Returns a textual description of the error that occurred.
AMError.ErrorNumber String Returns the error number associated with the error text.
AMError.FunctionName String Returns the name of the function that generated the error (if applicable).
AMError.IPAddress String Returns the IP address of the computer which generated an error.
AMError.MachineName String Returns the name of the computer where the error occurred.
AMError.ParentTaskName String Returns the name of the parent task (if the task that failed was a child task or sub-task).
AMError.StepNumber String Returns the step number that generated an error.
AMError.StepText String Returns a textual description of the step that generated an error in AML format (similar to how it would appear in the Task Builder's Steps panel if the View parameter is set to AML).
AMError.TagLine String Returns the AML tag line of the step that failed with an error.
AMError.TaskName String Returns the name of the task that generated an error.