Using AMError

When a task generates an error, it automatically creates a dataset called AMError. This dataset can be used within the task to determine specific characteristics about the error that occurred, including information such as error number, error description, step that generated the error, and other values. If a subtask fails, AMError values can be passed to the parent task.

AMError is a standard AutoMate dataset and can be used much like the datasets created by the SQL Query and Get E-Mail action. The fields of AMError can be used to examine properties of the specific error that failed the task. For example, using a 'Message Box' action with the Message to display parameter set to:

%AmError.ErrorDesc%

would display a message dialog during task execution returning a text description of the error.

Parameters

Every instance of AMError is populated with the following fields:  

Name

Data Type

Return Value

AMError.ErrorDesc

String

Returns a description of the error.

AMError.ErrorNumber

String

Returns the error number associated with the error text.

AMError.IPAddress

String

Returns the Address of the machine which generated an error.

AMError.ParentTaskName

String

Returns the name of the parent task (if the task that failed was a child or sub-task).

AMError.StepNumber

String

Returns the step number that generated an error.

AMError.StepText

String

Returns the step text in AML format.

AMError.TaskName

String

Returns the name of the task that generated an error.

AMError.TagLine

String

Returns the AML tagline of the step that failed with an error.

 

See Also

Datasets

Introduction to AML