Improve reporting of Python exceptions

This commit is contained in:
wmayer
2013-05-04 14:23:53 +02:00
parent 2bbe465229
commit 946bd02df4
12 changed files with 58 additions and 56 deletions

View File

@@ -130,7 +130,7 @@ InteractiveInterpreter::InteractiveInterpreter()
Base::PyGILStateLocker lock;
PyObject* module = PyImport_ImportModule("code");
if (!module)
throw Base::PyException();
throw Base::PyException();
PyObject* func = PyObject_GetAttrString(module, "InteractiveInterpreter");
PyObject* args = Py_BuildValue("()");
d = new InteractiveInterpreterP;