Salome HOME
23514: EDF 16031 - SMESH freezes
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_ProjectionSource2D_i.cxx
index 93cd392c0f14609ede6d0eebaba4651f9b684eed..369cc29dfee7cdd46bb10df40e91c1501715443c 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i" );
   myBaseImpl = new ::StdMeshers_ProjectionSource2D( theGenImpl->GetANewId(),
                                                     theStudyId,
                                                     theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i
 
 StdMeshers_ProjectionSource2D_i::~StdMeshers_ProjectionSource2D_i()
 {
-  MESSAGE( "StdMeshers_ProjectionSource2D_i::~StdMeshers_ProjectionSource2D_i" );
 }
 
 //=============================================================================
@@ -298,12 +296,16 @@ void StdMeshers_ProjectionSource2D_i::LoadFrom( const char* theStream )
 
   myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
 
-  GetImpl()->SetSourceMesh       ( meshImpl );
-  GetImpl()->SetSourceFace       ( shapes[ SRC_FACE ] );
-  GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
-                                   shapes[ SRC_VERTEX2 ],
-                                   shapes[ TGT_VERTEX1 ],
-                                   shapes[ TGT_VERTEX2 ]);
+  try {
+    GetImpl()->SetSourceMesh       ( meshImpl );
+    GetImpl()->SetSourceFace       ( shapes[ SRC_FACE ] );
+    GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
+                                     shapes[ SRC_VERTEX2 ],
+                                     shapes[ TGT_VERTEX1 ],
+                                     shapes[ TGT_VERTEX2 ]);
+  }
+  catch( ... ) {
+  }
   myBaseImpl->LoadFrom( is );
 
   std::istringstream str( theStream );