Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Plugin/src/SofaPython3/PythonEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ void executePython_(const T& emitter, std::function<void()> cb)
std::stringstream tmp;
tmp << "Unable to execute code." << msgendl
<< "Python exception:" << msgendl
<< " " << e.what();
<< " " << e.what()
<< PythonEnvironment::getPythonCallingPointString();
msg_error(emitter) << tmp.str();
}
}
Expand Down
11 changes: 4 additions & 7 deletions bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_DataEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ void DataEngine_Trampoline::doUpdate()
{
PythonEnvironment::executePython(this, [this](){
py::object self = py::cast(this);
if (py::hasattr(self, "update")) {
if (py::hasattr(self, "update"))
{
py::object fct = self.attr("update");
try {
fct();
return;
} catch (std::exception& /*e*/) {
throw py::type_error(this->getName() + ": The DataEngine requires an update method with no parameter and no return type");
}
fct();
return;
}
throw py::type_error(this->getName() + " has no update() method.");
});
Expand Down