Salome HOME
Check result of Compute() in test and examples
[modules/smesh.git] / doc / examples / creating_meshes_ex07.py
index 4a181c237a6f80584601bd153d12df93f0951912..d0d4c8e9f9472c409f529ec71dca1668833f8352 100644 (file)
@@ -46,7 +46,7 @@ algo1D_1=Mesh_inf.Segment()
 algo1D_1.NumberOfSegments(10)
 algo2D_1=Mesh_inf.Quadrangle()
 algo3D_1=Mesh_inf.Hexahedron()
-Mesh_inf.Compute()
+if not Mesh_inf.Compute(): raise Exception("Error when computing Mesh")
 
 # create a group on the top face
 Gsup1=Mesh_inf.Group(Fsup1, "Sup")
@@ -59,7 +59,7 @@ algo1D_2=Mesh_sup.Segment()
 algo1D_2.NumberOfSegments(5)
 algo2D_2=Mesh_sup.Quadrangle()
 algo3D_2=Mesh_sup.Hexahedron()
-Mesh_sup.Compute()
+if not Mesh_sup.Compute(): raise Exception("Error when computing Mesh")
 
 # create a group on the top face
 Gsup2=Mesh_sup.Group(Fsup2, "Sup")