Main Content

sldiagviewer.reportError

Report error messages in Diagnostic Viewer

Description

sldiagviewer.reportError(Message) reports the diagnostic message as an error in the Diagnostic Viewer.

output = sldiagviewer.reportError(Message) returns a logical 1 (true) when the diagnostic message reports successfully in the Diagnostic Viewer. Otherwise, an error message is displayed in the command window and no value is returned.

example

output = sldiagviewer.reportError(__,Component=ComponentNameValue) specifies the name of the component or product that generates the diagnostic message.

Examples

Input Arguments

collapse all

Description of error that is displayed in the Diagnostic Viewer, specified as a string, MSLException object, or MException object.

Example: Unrecognized function or variable 'p'.

Name of the component or product that generates the diagnostic message, specified as a character vector or string.

Example: "Stateflow"

Example: "Simulink"

Data Types: string | char

Version History

Introduced in R2014a