handle exception when running unit tests in GUI mode

This commit is contained in:
wmayer
2018-03-30 18:38:58 +02:00
parent 889b133af6
commit c75d1cd777

View File

@@ -1032,7 +1032,12 @@ void MainWindow::delayedStartup()
{
// automatically run unit tests in Gui
if (App::Application::Config()["RunMode"] == "Internal") {
Base::Interpreter().runString(Base::ScriptFactory().ProduceScript("FreeCADTest"));
try {
Base::Interpreter().runString(Base::ScriptFactory().ProduceScript("FreeCADTest"));
}
catch (const Base::Exception& e) {
e.ReportException();
}
return;
}