TTMSMCPTaskRegistry.SetTaskError Method
Stores the failure of a registered task, marks it failed and wakes the callers waiting for it to finish.
API unit family: TMS.MCP.Tasks
Declaring type: TTMSMCPTaskRegistry
Syntax
procedure SetTaskError(const ATaskId: string; AError: TJSONObject);
Remarks
There is no need to set the state separately. When the task has already finished the object is released instead of stored, so the first outcome wins. When the identifier is unknown nothing happens and the object is left untouched, which leaves the caller responsible for releasing it.
Parameters
| Name | Description |
|---|---|
ATaskId |
Identifier of the task to fail. |
AError |
Description of the failure. The task takes ownership of it. |