Error dialog instead of error message in command window

조회 수: 2 (최근 30일)
Johan
Johan 2012년 7월 4일
Hi! Is it possible to get a error dlg instead of error msg i command window? Tanks Johan

채택된 답변

Image Analyst
Image Analyst 2012년 7월 4일
편집: Image Analyst 2012년 7월 4일
Try this:
try
% Some code that generates an error/exception.
catch ME
errorMessage = sprintf('Error in function blah_blah_blah().\n\nError Message:\n%s', ME.message);
% Print to command window.
fprintf(1, '%s\n', errorMessage);
% Display pop up message and wait for user to click OK
uiwait(warndlg(errorMessage));
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by