Error dialog instead of error message in command window

2 vues (au cours des 30 derniers jours)
Johan
Johan le 4 Juil 2012
Hi! Is it possible to get a error dlg instead of error msg i command window? Tanks Johan

Réponse acceptée

Image Analyst
Image Analyst le 4 Juil 2012
Modifié(e) : Image Analyst le 4 Juil 2012
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

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Parallel Server dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by