Skip to content
Snippets Groups Projects
Commit 6e1708bf authored by Daniel Savchenko's avatar Daniel Savchenko
Browse files

catch error if pythonplugins dont import

parent cec93ad9
No related branches found
No related tags found
2 merge requests!265Mac fix,!264Mac fix
......@@ -192,8 +192,16 @@ void PythonInterpreter::initPython() {
std::cerr << "Importing "+ pythonPlugins[i].toStdString() + " module ...";
#endif
//try catching an error here for debugging purposes
try{
py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
}
catch (py::error_already_set &e)
{
pyError(e.what());
return;
}
#ifdef PYTHON_DEBUG
std::cerr << " Done" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment