diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 8871f2718d..d3c8bf4480 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -1444,12 +1444,8 @@ void PythonCommand::activated(int iMsg) } } catch (const Base::PyException& e) { - Base::Console().error( - "Running the Python command '%s' failed:\n%s\n%s", - sName, - e.getStackTrace().c_str(), - e.what() - ); + Base::Console().error("Running the Python command '%s' failed:", sName); + e.reportException(); } catch (const Base::Exception&) { Base::Console().error("Running the Python command '%s' failed, try to resume", sName); @@ -1697,12 +1693,8 @@ void PythonGroupCommand::activated(int iMsg) catch (Py::Exception&) { Base::PyGILStateLocker lock; Base::PyException e; - Base::Console().error( - "Running the Python command '%s' failed:\n%s\n%s", - sName, - e.getStackTrace().c_str(), - e.what() - ); + Base::Console().error("Running the Python command '%s' failed:", sName); + e.reportException(); } } @@ -1794,12 +1786,8 @@ Action* PythonGroupCommand::createAction() catch (Py::Exception&) { Base::PyGILStateLocker lock; Base::PyException e; - Base::Console().error( - "createAction() of the Python command '%s' failed:\n%s\n%s", - sName, - e.getStackTrace().c_str(), - e.what() - ); + Base::Console().error("createAction() of the Python command '%s' failed:", sName); + e.reportException(); } _pcAction = pcAction;