OnTaskFailure
Syntax
OnTaskFailure(FunctionName, StepNumber, ErrorText, ErrorCode)
Description
This event is fired each time a task fails. Depending on how the step is configured, the task may either continue after the error occurs or may be aborted. In the latter case, the OnTaskEndevent is fired immediately afterward.
NOTE:
Line numbers are 0 based within the Task Interpreter (for example, step
1 inside the Task Builder is step 0 when using this object).
Parameters
Parameter | Description |
---|---|
FunctionName | The name of the executed function. |
StepNumber | The step number which caused the error. Since line numbers are 0 based, if step 2 (as it appears in the Task Builder's Steps panel) caused the error, this object will return step 1. |
ErrorText | A textual description of the error that occurred. |
ErrorCode | The error code related the error that occurred. |
Example
Sub
Main
MsgBox OnTaskFailure()
End Sub
See also
Main | OnStepEnd | OnStepError | OnStepStart | OnTaskEnd | OnTaskFailure | OnTaskStart |