Skip to main content
Table of Contents

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

TMS.MCP.Tasks.hppPascalC++
procedure SetTaskError(const ATaskId: string; AError: TJSONObject);
void __fastcall SetTaskError(const System::UnicodeString ATaskId, System::Json::TJSONObject* AError);

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.