[skip ci] App: print affected Python type if serializing via JSON fails

FemGui: add default implementations of __getstate__/__setstate__ to _ViewProviderFemResultMechanical
This commit is contained in:
wmayer
2020-03-10 16:32:31 +01:00
parent 9471ca52d7
commit cc9f1c5a1e
2 changed files with 8 additions and 0 deletions

View File

@@ -109,6 +109,8 @@ std::string PropertyPythonObject::toString() const
repr = str.as_std_string("ascii");
}
catch (Py::Exception&) {
Py::String typestr(this->object.type().str());
Base::Console().Error("PropertyPythonObject::toString(): failed for %s\n", typestr.as_string().c_str());
Base::PyException e; // extract the Python error text
e.ReportException();
}