Salome HOME
Corrected for bug IPAL12571.
[modules/smesh.git] / src / StdMeshers / StdMeshers_Hexa_3D.cxx
index a92e94b84d0c6a73c5ea9c65fc10f34bf61530a5..c5a57cdba064c5087c9fa76945fd0c9d65234920 100644 (file)
@@ -176,9 +176,10 @@ static bool findIJ (const SMDS_MeshNode* node, const FaceQuadStruct * quad, int&
 //=============================================================================
 
 bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
-                                 const TopoDS_Shape & aShape) throw(SALOME_Exception)
+                                 const TopoDS_Shape & aShape)// throw(SALOME_Exception)
 {
-  Unexpect aCatch(SalomeException);
+  // PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside
+  //Unexpect aCatch(SalomeException);
   MESSAGE("StdMeshers_Hexa_3D::Compute");
   SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
   
@@ -253,6 +254,9 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
     ASSERT(quadAlgo);
     try {
       aQuads[i] = quadAlgo->CheckAnd2Dcompute(aMesh, aFace, _quadraticMesh);
+      if(!aQuads[i]) {
+       return error( quadAlgo->GetComputeError());
+      }
     }
     catch(SALOME_Exception & S_ex) {
       return ClearAndReturn( aQuads, error(COMPERR_SLM_EXCEPTION,TComm(S_ex.what()) <<