From 65863849e6a005012057b536f818f6722558d98e Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 10 Feb 2012 15:01:34 +0000 Subject: [PATCH] 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 --- src/Gui/Macro.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/Macro.cpp b/src/Gui/Macro.cpp index f1b505fc2..a7285008e 100644 --- a/src/Gui/Macro.cpp +++ b/src/Gui/Macro.cpp @@ -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()); }