handle exception when running unit tests in GUI mode

This commit is contained in:
wmayer
2018-03-30 18:38:58 +02:00
parent f7d6e98a63
commit d9be5bf578

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;
}