ErrorSeverity property
Set severity of check failure
Values
0
|
1 |
Description
The ErrorSeverity
property is an integer value that specifies
whether the check is marked as a warning or failure when the check flags an issue in
your model. This property is the programmatic equivalent of using the Check
result when issues are flagged options in the Model Advisor Configuration
Editor.
| Marks the check as a warning. |
| Marks the check as a failure. |
Example
In this sample code for defining the properties of a custom check, the value for
ErrorSeverity
is "1"
. Therefore, if a
violation of this check is flagged in a model, the check is marked as Fail in the
results.
% Create ModelAdvisor.Check object and set properties. rec = ModelAdvisor.Check('com.mathworks.sample.detailStyle'); rec.Title = 'Check whether block names appear below blocks'; rec.TitleTips = 'Check position of block names'; rec.setCallbackFcn(@DetailStyleCallback,'None','DetailStyle'); rec.ErrorSeverity = 1;