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 Center および File ExchangeMATLAB Parallel Server についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by