]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for PAL13364(EDF PAL271 : Med export with not enough space on disk : No Warning...
authormzn <mzn@opencascade.com>
Thu, 19 Oct 2006 08:29:58 +0000 (08:29 +0000)
committermzn <mzn@opencascade.com>
Thu, 19 Oct 2006 08:29:58 +0000 (08:29 +0000)
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESH_msg_en.po

index f6cf1ff7833658b27de42a44e5dcd41944493bdd..aa02b402261a3f61a4f9b1c9d431e5d0253fd272 100644 (file)
@@ -987,9 +987,11 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
   }
   catch(const std::exception& exc) {
     INFOS("Follow exception was cought:\n\t"<<exc.what());
+    throw;
   }
   catch(...) {
     INFOS("Unknown exception was cought !!!");
+    throw;
   }
 
   myMeshId = -1;
index 0362edadc6faeabd7567d75d85bbac6141ecd87b..196d6928bcbcb909d1de78f807197d8d950d74ce 100644 (file)
@@ -352,21 +352,32 @@ using namespace std;
          if ( aFile.exists() )
            aFile.remove();
          SUIT_OverrideCursor wc;
-         switch ( theCommandID ) {
-         case 125:
-         case 122:
-           aMesh->ExportToMED( aFilename.latin1(), toCreateGroups, aFormat );
-           break;
-         case 124:
-         case 121:
-           aMesh->ExportDAT( aFilename.latin1() );
-           break;
-         case 126:
-         case 123:
-           aMesh->ExportUNV( aFilename.latin1() );
-           break;
-         default:
-           break;
+
+         try {
+           switch ( theCommandID ) {
+           case 125:
+           case 122:
+             aMesh->ExportToMED( aFilename.latin1(), toCreateGroups, aFormat );
+             break;
+           case 124:
+           case 121:
+             aMesh->ExportDAT( aFilename.latin1() );
+             break;
+           case 126:
+           case 123:
+             aMesh->ExportUNV( aFilename.latin1() );
+             break;
+           default:
+             break;
+           }
+         }
+         catch (const SALOME::SALOME_Exception& S_ex){
+           wc.suspend();
+           SUIT_MessageBox::warn1(SMESHGUI::desktop(),
+                                   QObject::tr("SMESH_WRN_WARNING"),
+                                   QObject::tr("SMESH_EXPORT_FAILED"),
+                                   QObject::tr("SMESH_BUT_OK"));
+           wc.resume();
          }
        }
       }
index b8e73b45b6e5cae0b231961085cbaf65f1393fcf..6b63444d5105e201439e474d100c3844c19cb771 100644 (file)
@@ -173,6 +173,10 @@ msgstr "No available data in selection"
 msgid "SMESH_POLYEDRE_CREATE_ERROR"
 msgstr "Polyedron creation error"
 
+#Export mesh
+msgid "SMESH_EXPORT_FAILED"
+msgstr "Mesh export failed.\nProbably, there is not enough space on disk."
+
 #-------------------------------------------------------------------------
 # MEN
 #-------------------------------------------------------------------------