FEM: raise an exception if no valid object is selected

This commit is contained in:
wmayer
2023-02-10 19:51:39 +01:00
committed by wwmayer
parent 51d42630ac
commit b3322a4556

View File

@@ -193,12 +193,12 @@ private:
App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(item)->getDocumentObjectPtr();
if (obj->getTypeId().isDerivedFrom(meshId)) {
static_cast<FemMeshObject*>(obj)->FemMesh.getValue().write(EncodedName.c_str());
break;
return Py::None();
}
}
}
return Py::None();
throw Py::RuntimeError("No FEM mesh for export selected");
}
Py::Object read(const Py::Tuple& args)
{