Main Content


Return errors that occurred during artifact tracing

Since R2020b



errors = getArtifactErrors(metricEngine) returns the errors that occurred when the metric engine analyzed the artifacts. When you collect metric results by using the execute function, the engine object does not collect results for artifacts that return errors during analysis.

Note that there is also a function getArtifactErrors (Fixed-Point Designer) in the Fixed-Point Designer™ documentation.


collapse all

Collect metrics for the testing artifacts in a project. Then, check if artifacts returned errors and were not analyzed.

Open the project. At the command line, type dashboardCCProjectStart.


Create a metric.Engine object for the project.

metric_engine = metric.Engine();

Update the trace information for metric_engine to ensure that the artifact information is up to date.


Collect results for the metric 'RequirementsPerTestCase' by using the execute function on the metric.Engine object.


Access the errors that occurred during analysis.

ans = 

  0×0 empty struct array with fields:


For this example, the artifacts did not return errors.

Input Arguments

collapse all

Metric engine object that you want to check for errors, specified as a metric.Engine object.

Output Arguments

collapse all

Artifact errors that occurred when you executed the metric.Engine object, returned as an array of structures that correspond to the errors. The structure for an error contains these fields:

  • Address — Address of the artifact that returned the error

  • UUID — Unique identifier of the artifact

  • ErrorID — Identifier of the error

  • ErrorMessage — Description of the error

Alternative Functionality


You can view artifact errors in the Errors folder in the dashboard user interface. To see details about the warnings and errors that the dashboard finds during artifact analysis, at the bottom of the Dashboard window, click Diagnostics.

For more information, see Artifact Errors.

Version History

Introduced in R2020b