]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To introduce additional checks for reading distributed MED files
authorapo <apo@opencascade.com>
Fri, 16 Nov 2007 09:35:58 +0000 (09:35 +0000)
committerapo <apo@opencascade.com>
Fri, 16 Nov 2007 09:35:58 +0000 (09:35 +0000)
src/VISU_I/VISU_MultiResult_i.cc
src/VISU_I/VISU_Result_i.cc

index 8894cb93114e44a3b38519aebbc9ba050cb1fd14..ce2d5d783ac3769debfa7db7a2ee49903d75de64 100644 (file)
@@ -551,12 +551,23 @@ VISU::MultiResult_i
   QFileInfo aFileInfo(theFileName);
   QString aTargetFileName = aFileInfo.filePath();
   if(aTargetFileName.endsWith("_maitre.med")){
-    myMultiprObj.create(theFileName);
-    if (myMultiprObj.isValidDistributedMEDFile()) {
-      aTargetFileName = myMultiprObj.getSequentialMEDFilename();
-      SetInitFileName(aFileInfo.filePath().latin1());
-      SetName(VISU::GenerateName(aFileInfo.fileName()).latin1(), false);
-      myIsBuildParts = true;
+    try {
+      myMultiprObj.create(theFileName);
+      if ( myMultiprObj.isValidDistributedMEDFile() ) {
+       aTargetFileName = myMultiprObj.getSequentialMEDFilename();
+       SetInitFileName(aFileInfo.filePath().latin1());
+       SetName(VISU::GenerateName(aFileInfo.fileName()).latin1(), false);
+       myIsBuildParts = true;
+      }
+    }catch(std::exception& exc){
+      MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+    }catch(multipr::RuntimeException& exc){
+      std::ostringstream aStream;
+      exc.dump(aStream);
+      aStream<<ends;
+      MSG(MYDEBUG,"Follow exception was occured in:\n"<<aStream.str());
+    }catch(...){
+      MSG(MYDEBUG,"Unknown exception !!!");
     }
   }
 
index d7af2d036035ef2b7dc7048affb2477619f187ee..5fc9b93ee22c910a12e486bccef4150d8928f007 100644 (file)
@@ -535,9 +535,9 @@ VISU::Result_i
       return this;
     }
   }catch(std::exception& exc){
-    INFOS("Follow exception was occured :\n"<<exc.what());
+    MSG(MYDEBUG,"Follow exception was occured in:\n"<<aStream.str());
   }catch(...){
-    INFOS("Unknown exception was occured!!!");
+    MSG(MYDEBUG,"Unknown exception !!!");
   }
   return NULL;
 }