How can I save to a variable and/or file, an error message from a guide?
조회 수: 1 (최근 30일)
이전 댓글 표시
When I get an error message from a guide, how can I save them to a variable or a file? Thank you Denise
댓글 수: 0
채택된 답변
Walter Roberson
2015년 9월 6일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!