User`s guide

Evaluate MATLAB Expression
10-17
To stop report generation when an error occurs in the MATLAB code that you added,
change the second and third lines of the following default error handling code, as
described below:
warningMessageLevel = 2;
displayWarningMessage = true;
failGenerationWithException = false;
failGenerationWithoutException = false;
To stop report generation and display an exception, change the default code to:
displayWarningMessage = false;
failGenerationWithException = true;
To stop report generation without displaying an exception, change the default code to:
displayWarningMessage = false;
failGenerationWithoutException = true;
If you want to completely replace the default error handling code, use the
evalException.message variable in your code to return information for the
exception.
Insert Anything into Report?
Inserts text only if you select one of the following options:
Insert MATLAB expression string in report
Display command window output in report
Class
rptgen.cml_eval
See Also
Insert Variable, MATLAB Property Table, MATLAB/Toolbox Version Number,
Variable Table