Redirect compiled GUI error/output information

1 次查看(过去 30 天)
I have a GUI under development that throws errors. This is by design to test some error handling/recovery methods. The problem is that in order to see when an error makes it past the handling I must have launched the compiled GUI from the command prompt. Since no one does that I want to make it redirect that error information by default to an error dialog box. I have a work around by wrapping everything in try catch blocks but this feels sloppy to me and it works only for errors. Is there a way to redirect all printed/displayed information to a stream other than the command prompt by default? I have played around with creating a separate figure as sort of a log but had trouble directing output there. The ideal solution would be anything like fprintf, display, warning or error would magically create a new window and display the text. If I can't redirect everything, redirecting all errors somewhere would still be very helpful.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by