Print pythons exceptions in macros to output window (copied from Git)

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5435 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer 2012-02-10 15:01:34 +00:00
parent 21e61f155e
commit 65863849e6

View File

@ -227,6 +227,10 @@ void MacroManager::run(MacroType eType,const char *sName)
PyErr_Clear();
Base::Interpreter().systemExit();
}
catch (const Base::PyException& e) {
Base::Console().Error("%s%s: %s\n",
e.getStackTrace().c_str(), e.getErrorType().c_str(), e.what());
}
catch (const Base::Exception& e) {
qWarning("%s",e.what());
}