Salome HOME
*** empty log message ***
authorasl <asl@opencascade.com>
Mon, 29 Aug 2005 07:38:58 +0000 (07:38 +0000)
committerasl <asl@opencascade.com>
Mon, 29 Aug 2005 07:38:58 +0000 (07:38 +0000)
src/VISUGUI/VisuGUI.cxx

index 0596d493adddd74705f83ac8d444325bf33e8487..fe36604aec67195832af678f88d9e715fe60ae9e 100644 (file)
@@ -232,7 +232,17 @@ OnExploreMEDFile()
   if(aFileInfo.exists()){
     application()->putInfo( tr("MEN_EXPLORE_MED_FILE") + " " + aFileInfo.filePath() + "..." );
     std::string aStudyName = aStudy->Name();
-    aGen->readStructFileWithFieldType(aFileInfo.filePath(),aStudyName.c_str());
+    try
+    {
+      aGen->readStructFileWithFieldType(aFileInfo.filePath(),aStudyName.c_str());
+    }
+    catch(...)
+    {
+      SUIT_MessageBox::warn1(GetDesktop(this),
+                             tr("WRN_VISU"),
+                             tr("ERR_ERROR_IN_THE_FILE"),
+                             tr("BUT_OK"));
+    }
     application()->putInfo(aFileInfo.filePath()+tr("INF_DONE"));
     getApp()->updateObjectBrowser(true); // as need to update MED tree
     getApp()->updateActions();