]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on Bug GVIEW10304
authorapo <apo@opencascade.com>
Fri, 14 Oct 2005 15:03:57 +0000 (15:03 +0000)
committerapo <apo@opencascade.com>
Fri, 14 Oct 2005 15:03:57 +0000 (15:03 +0000)
 Failure reading incorrect med file

src/CONVERTOR/VISU_MedConvertor.cxx

index afa534b88daca5f99ebaeb29df53880984c73e5a..4ab71595a40871b4480d725ca88a4e83c2104bbf 100644 (file)
@@ -1201,42 +1201,52 @@ VISU_MedConvertor
              "'; myNbPoints = "<<aMesh->myNbPoints<<
              "; aDim = "<<aDim<<"\n");
       
-      BEGMSG(MYDEBUG,"aEntityInfo.size() = "<<aEntityInfo.size()<<"\n");
-      TFamilyCounterMap aFamilyID2CellsSize;
-
-      BuildMeshOnEntityMap(aMesh,
-                          aFamilyID2CellsSize,
-                          aEntityInfo,
-                          aNodeInfo,
-                          aMed);
-      
-      BuildFieldMap(aMesh,
-                   aEntityInfo,
-                   aMKey2Profile,
-                   aKey2Gauss,
-                   aMed);
+#ifndef _DEXCEPT_
+      try{
+#endif
+       BEGMSG(MYDEBUG,"aEntityInfo.size() = "<<aEntityInfo.size()<<"\n");
+       TFamilyCounterMap aFamilyID2CellsSize;
+       
+       BuildMeshOnEntityMap(aMesh,
+                            aFamilyID2CellsSize,
+                            aEntityInfo,
+                            aNodeInfo,
+                            aMed);
+       
+       BuildFieldMap(aMesh,
+                     aEntityInfo,
+                     aMKey2Profile,
+                     aKey2Gauss,
+                     aMed);
 
 #ifdef _LOAD_FAMILIES_
-      MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(aMed,aMeshInfo);
-      
-      BuildFamilyMap(aMesh,
-                    aFamilyID2CellsSize,
-                    aEntityInfo,
-                    anEntity2TGeom2ElemInfo,
-                    aFamilyInfoSet,
-                    aMed);
-      
-      BuildGroupMap(aMesh,
-                   aFamilyInfoSet);
+       MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(aMed,aMeshInfo);
+       
+       BuildFamilyMap(aMesh,
+                      aFamilyID2CellsSize,
+                      aEntityInfo,
+                      anEntity2TGeom2ElemInfo,
+                      aFamilyInfoSet,
+                      aMed);
+       
+       BuildGroupMap(aMesh,
+                     aFamilyInfoSet);
 #endif
 
-      PCalculateMinMax aCalculateMinMax(new TCalculateMinMax(aMesh,
-                                                            aEntityInfo,
-                                                            aMKey2Profile,
-                                                            aKey2Gauss,
-                                                            aMed));
+       PCalculateMinMax aCalculateMinMax(new TCalculateMinMax(aMesh,
+                                                              aEntityInfo,
+                                                              aMKey2Profile,
+                                                              aKey2Gauss,
+                                                              aMed));
        
-      boost::thread aThread(boost::bind(&CalculateMinMax,aCalculateMinMax));
+       boost::thread aThread(boost::bind(&CalculateMinMax,aCalculateMinMax));
+#ifndef _DEXCEPT_
+      }catch(std::exception& exc){
+       MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+      }catch(...){
+       EXCEPTION(runtime_error,"Unknown exception !!!");
+      }
+#endif
 
 #ifndef _DEXCEPT_
     }catch(std::exception& exc){