Main Content

matlab.buildtool.TaskResult Class

Namespace: matlab.buildtool

Result of running a task

Since R2022b

Description

The matlab.buildtool.TaskResult class provides the result of running a task using the build tool. The result includes information about whether the task failed or was skipped, as well as the duration of the task run.

When the build runner creates a BuildResult object, the TaskResults property on the object is a vector of TaskResult objects. Use this TaskResults property to access the result of each task that was part of the build. You do not need to create an object of the TaskResult class directly.

Properties

expand all

Name of the task corresponding to the result, returned as a string scalar.

Attributes:

GetAccess
public
SetAccess
Restricts access

Whether the task failed, returned as a 1 or 0 of data type logical. If the value is 1, then the task failed. Otherwise, it ran without any failures. A task fails if the build runner encounters an uncaught error while running the task.

Attributes:

GetAccess
public
SetAccess
Restricts access

Whether the task was skipped, returned as a 1 or 0 of data type logical. If the value is 1, then the build runner skipped the task and did not run it. Otherwise, it ran the task. A task is skipped if any of these conditions is true:

  • You explicitly instructed the build runner to skip the task.

  • The build runner encounters an uncaught error before running the task, and you did not instruct the build runner to continue on failure.

  • The task is up to date and its DisableIncremental property is false. For more information, see Improve Performance with Incremental Builds.

Attributes:

GetAccess
public
SetAccess
Restricts access

Whether the task was skipped because it was up to date, returned as a 1 or 0 of data type logical. For more information, see Improve Performance with Incremental Builds.

Attributes:

GetAccess
public
SetAccess
Restricts access

Time spent running the task, returned as a duration scalar.

Attributes:

GetAccess
public
SetAccess
Restricts access

Data Types: duration

Version History

Introduced in R2022b

expand all