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 AMError fields 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% displays a message 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 A textual description of the error that occurred.
AMError.ErrorNumber String The error number associated with the error text.
AMError.FunctionName String The name of the function that generated the error (if applicable).
AMError.IPAddress String The IP address of the computer that generated an error.
AMError.MachineName String The name of the computer where the error occurred.
AMError.ParentTaskName String The name of the parent task (if the task that failed is a child task or sub-task).
AMError.StepNumber String The step number that generated an error.
AMError.StepText String A textual description of the step that generated an error in AML format (similar to how it appears in the Task Builder Steps panel if the View parameter is set to AML).
AMError.TagLine String The AML tag line of the step that failed with an error.
AMError.TaskName String The name of the task that generated an error.