+ handle Python's SystemExit exception when running script or macro

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5398 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer
2012-01-11 18:39:27 +00:00
parent 84ed629cb6
commit 5db505d43d
3 changed files with 23 additions and 8 deletions

View File

@@ -1190,6 +1190,10 @@ void Application::processCmdLineFiles(void)
}
}
}
catch (const Base::SystemExitException&) {
Base::PyGILStateLocker locker;
Base::Interpreter().systemExit();
}
catch (const Base::Exception& e) {
Console().Error("Exception while processing file: %s [%s]\n", File.filePath().c_str(), e.what());
}