Salome HOME
New method was not working when mesh was removed
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index a45b96abf643367551b20be08bead4603a26131a..c9ac03e245d010e5cd22e5575b55bcbc90298b8b 100644 (file)
@@ -1092,6 +1092,14 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
       theCommand->RemoveArgs();
       id_mesh->second->Process( theCommand );
       id_mesh->second->AddProcessedCmd( theCommand );
+
+      // Changing command for compute adding a check on isDone and raising
+      // exception if not completed
+      _AString meshStr = theCommand->GetObject().ToCString();
+      _AString excStr = "\"Could not compute mesh: \"+";
+      excStr += meshStr + ".GetName()";
+      _AString compStr = theCommand->GetString()+"\nif not isDone:\n\traise Exception("+excStr+")";
+      theCommand->GetString() = compStr;
       return;
     }
   }