Salome HOME
Check result of Compute() in test and examples
[modules/smesh.git] / doc / examples / defining_hypotheses_ex08.py
index 43d77f1c28829563b67ebd81b1c6a3c5aecf02de..d59d4430fbc6b048deedc8b1961b47c451156c31 100644 (file)
@@ -39,7 +39,7 @@ algo_local.Arithmetic1D(1, 4)
 algo_local.Propagation()
 
 # compute the mesh which contains prisms
-hexa.Compute()
+if not hexa.Compute(): raise Exception("Error when computing Mesh")
 
 # create another mesh on the box
 mesh = smesh_builder.Mesh(box, "Propagation of distribution of nodes")
@@ -60,4 +60,4 @@ algo_local.Arithmetic1D(1, 4)
 algo_local.PropagationOfDistribution()
 
 # compute the mesh which contains hexahedra only
-mesh.Compute()
+if not mesh.Compute(): raise Exception("Error when computing Mesh")