Salome HOME
Check result of Compute() in test and examples
[modules/smesh.git] / doc / examples / defining_hypotheses_ex09.py
index 9646d17079a346d33d78bc6cbfadc50e0bc84b47..cb02c912ef628884e02edea54818583b97fc5f0e 100644 (file)
@@ -29,7 +29,7 @@ algo3D = hexa.Hexahedron()
 algo1D.Arithmetic1D(1, 4)
 
 # compute the mesh
-hexa.Compute()
+if not hexa.Compute(): raise Exception("Error when computing Mesh")
 
 # 2. Create a tetrahedral mesh on the box
 tetra = smesh_builder.Mesh(box, "Box : tetrahedrical mesh")
@@ -48,4 +48,4 @@ algo1D.Arithmetic1D(1, 4)
 algo2D.LengthFromEdges()
 
 # compute the mesh
-tetra.Compute()
+if not tetra.Compute(): raise Exception("Error when computing Mesh")