Error dialog instead of error message in command window
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi! Is it possible to get a error dlg instead of error msg i command window? Tanks Johan
0 Commenti
Risposta accettata
Image Analyst
il 4 Lug 2012
Modificato: Image Analyst
il 4 Lug 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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su MATLAB Parallel Server in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!