How can I save to a variable and/or file, an error message from a guide?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Denise Selegato
el 6 de Sept. de 2015
Comentada: Denise Selegato
el 7 de Sept. de 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 comentarios
Respuesta aceptada
Walter Roberson
el 6 de Sept. de 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
Más respuestas (0)
Ver también
Categorías
Más información sobre Structures en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!