Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

ssSetErrorStatus - Report an error

Syntax

void ssSetErrorStatus(SimStruct *S, const char_T *msg)

Arguments

S

SimStruct representing an S-Function block or a Simulink model.

msg

Error message.

Description

Use this function to report errors that occur in your S-function. For example:

ssSetErrorStatus(S, "error message");
return;

This function causes the Simulink engine to stop and display the specified error message. The function does not generate an exception. Thus you can use it in your S-function to avoid creating exceptions when reporting errors.

Languages

C, C++

Example

See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/stvctf.c used in sfcndemo_stvctf.mdl.

See Also

ssWarning

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS