]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on Bug PAL6821
authorapo <apo@opencascade.com>
Tue, 11 Jan 2005 06:15:56 +0000 (06:15 +0000)
committerapo <apo@opencascade.com>
Tue, 11 Jan 2005 06:15:56 +0000 (06:15 +0000)
   CRASH after trying to create presentation for the imported .med file in Post-Pro

src/VISU_I/VISU_Mesh_i.cc

index d5f6e584e4ed548df1b391f3d2e388811e7871e0..dadbcdc77ce0f0715e2d5df7908ca1f60eb87802 100644 (file)
@@ -175,7 +175,7 @@ VISU::Mesh_i::~Mesh_i(){
 VISU::Storable* VISU::Mesh_i::Build(int theRestoring){
   SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
   aStudyBuilder->NewCommand();  // There is a transaction
-  //try{
+  try{
     if(myResult->GetInput() == NULL) 
       throw std::runtime_error("Mesh_i::Build - myResult->GetInput() == NULL !!!");
     if(!theRestoring){
@@ -228,13 +228,13 @@ VISU::Storable* VISU::Mesh_i::Build(int theRestoring){
       CORBA::String_var aString = GetID();
       anIOR->SetValue(aString); 
     }
-  //}catch(std::exception& exc){
-  //  INFOS("Follow exception was occured :\n"<<exc.what());
-  //  return NULL;
-  //}catch(...){
-  //  INFOS("Unknown exception was occured!");
-  //  return NULL;
-  //
+  }catch(std::exception& exc){
+    INFOS("Follow exception was occured :\n"<<exc.what());
+    return NULL;
+  }catch(...){
+    INFOS("Unknown exception was occured!");
+    return NULL;
+  } 
   aStudyBuilder->CommitCommand();
   return this;
 }