How can I save to a variable and/or file, an error message from a guide?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Denise Selegato
am 6 Sep. 2015
Kommentiert: Denise Selegato
am 7 Sep. 2015
When I get an error message from a guide, how can I save them to a variable or a file? Thank you Denise
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 6 Sep. 2015
In the code that you think might generate an error, instead of calling
Some Statement Here
encode it in a try/catch block that does whatever you want with the error
try
Some Statement Here
catch ME
%deal with the error the way you need
fprintf('Caught error "%s" with details "%s"\n', ME.identifier, ME.message);
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!