[App] Minor improvment to error handling for...
... a rare event, see https://forum.freecad.org/viewtopic.php?t=76947
This commit is contained in:
@@ -121,6 +121,11 @@ void PropertyPythonObject::fromString(const std::string& repr)
|
|||||||
try {
|
try {
|
||||||
if (repr.empty())
|
if (repr.empty())
|
||||||
return;
|
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);
|
Py::Module pickle(PyImport_ImportModule("json"),true);
|
||||||
if (pickle.isNull())
|
if (pickle.isNull())
|
||||||
throw Py::Exception();
|
throw Py::Exception();
|
||||||
|
|||||||
Reference in New Issue
Block a user