How to disable error box when using system to run compiled application?

2 次查看(过去 30 天)
I've generated a MATLAB application using R2016b, and I'm running it (the compiled version) using system() in order to test it in various scenarios, many of which result in error by design. Whenever such an error occurs, an error dialog box opens and I have to click 'ok' in order for it to close and the execution to terminate. This gets in the way of automating the testing procedure for multiple tests, as it requires me to wait and click ok in each execution. Is there a way to prevent system() from displaying that box when an error occurs? or at least not wait for it to close in order to continue?

采纳的回答

Jan
Jan 2016-11-6
The error is not caused by system, but by your application. Therefore you should catch errors there, e.g. by the catch command. If an automatic error handling is wanted, you have to definie this manually e.g. as input argument and consider it in the code.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Testing Frameworks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by