[App] Minor improvment to error handling for...

... a rare event, see https://forum.freecad.org/viewtopic.php?t=76947
This commit is contained in:
Syres916
2023-03-20 14:00:34 +00:00
committed by Uwe
parent 818c66d663
commit c9832a9f2d

View File

@@ -121,6 +121,11 @@ void PropertyPythonObject::fromString(const std::string& repr)
try {
if (repr.empty())
return;
if (repr == "null") {
Py::String typestr(this->object.type().str());
Base::Console().Log("PropertyPythonObject::fromString(): repr is null for object %s\n", typestr.as_string().c_str());
return;
}
Py::Module pickle(PyImport_ImportModule("json"),true);
if (pickle.isNull())
throw Py::Exception();