Prevent MATLAB from displaying full stack on error.
Ältere Kommentare anzeigen
EDIT: see answer by Daniel, throwascaller () is what I needed.
Dear all,
Is there a way, when generating an error(), to limit MATLAB output to 'msgIdent' and 'msgString' without the stack information? The reason for this question is that I created a class, overloaded subsref/asgn, and each one of these methods calls yet another method that checks/updates subs. From my prospective, a user who uses invalid subs should only get the error Ident/String that I define, without it to be followed by the whole stack.
I could obviously print the information on stderr and manage the termination by myself, but then usual exceptions management mechanisms could not be used by external code..
Thank you and best regards,
Cedric
Akzeptierte Antwort
Weitere Antworten (1)
Daniel Shub
am 14 Jan. 2013
6 Stimmen
I think with careful use of try/catch and throwascaller you can achieve this. Just be careful since it makes debugging very difficult.
1 Kommentar
Kategorien
Mehr zu Multi-Object Trackers 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!