Salome HOME
Improve swig generation process on Windows platform.
[tools/medcoupling.git] / src / INTERP_KERNEL / Geometric2D / InterpKernelGeo2DQuadraticPolygon.cxx
index bc701619816321a46cbf4179751d2f7af4a3b451..9cfb340750b567445054aafd36c8b1c6e81fa309 100644 (file)
@@ -60,9 +60,24 @@ QuadraticPolygon::QuadraticPolygon(const char *file)
         }
       while(1);
   }
-  catch(std::ifstream::failure&)
+  catch(const std::ifstream::failure&)
   {
   }
+  catch(const std::exception & ex)
+  {
+      // Some code before this catch throws the C++98 version of the exception (mangled
+      // name is " NSt8ios_base7failureE"), but FED24 compilation of the current version of the code
+      // tries to catch the C++11 version of it (mangled name "NSt8ios_base7failureB5cxx11E").
+      // So we have this nasty hack to catch both versions ...
+
+      // TODO: the below should be replaced by a better handling avoiding exception throwing.
+      if (std::string(ex.what()) == "basic_ios::clear")
+        {
+          //std::cout << "std::ios_base::failure C++11\n";
+        }
+      else
+        throw ex;
+  }
   front()->changeStartNodeWith(back()->getEndNode());
 }