Salome HOME
In ExportMED() use SMESH_TRY to normally transfer exceptions from the driver
authoreap <eap@opencascade.com>
Wed, 14 Aug 2013 12:34:41 +0000 (12:34 +0000)
committereap <eap@opencascade.com>
Wed, 14 Aug 2013 12:34:41 +0000 (12:34 +0000)
src/SMESH/SMESH_Mesh.cxx

index 4ae04c64775e0d12dd4e132d5caf3a1169682bb5..a8a789fbd070853499d55692d9c481ab77fa0960 100644 (file)
@@ -66,6 +66,8 @@
 #include <TopTools_MapOfShape.hxx>
 #include <TopoDS_Iterator.hxx>
 
+#include "SMESH_TryCatch.hxx" // include after OCCT headers!
+
 #include "Utils_ExceptHandlers.hxx"
 
 #include <boost/thread/thread.hpp>
@@ -1259,7 +1261,7 @@ void SMESH_Mesh::ExportMED(const char *        file,
                            bool                theAutoDimension)
   throw(SALOME_Exception)
 {
-  Unexpect aCatch(SalomeException);
+  SMESH_TRY;
 
   DriverMED_W_SMESHDS_Mesh myWriter;
   myWriter.SetFile         ( file, MED::EVersion(theVersion) );
@@ -1306,6 +1308,8 @@ void SMESH_Mesh::ExportMED(const char *        file,
   }
   // Perform export
   myWriter.Perform();
+
+  SMESH_CATCH( SMESH::throwSalomeEx );
 }
 
 //================================================================================