How do I get the ERROR function to only display the error message when used in a function or user defined object method without the line of code being displayed?
Ältere Kommentare anzeigen
When the ERROR function is used in a file, the error message is preceded by information about where the error occurred, and the stack field of the structure returned by LASTERROR. The stack field contains a structure array in the same format as the output of dbstack('-completenames'). This stack points to the line, function, and file in which the error occurred.
I want to use ERROR to display only the error message, leaving out the information about the stack.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Advanced Evaluation and Exception Handling finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!