Salome HOME
Improve swig generation process on Windows platform.
[tools/medcoupling.git] / src / INTERP_KERNEL / Geometric2D / InterpKernelGeo2DQuadraticPolygon.cxx
index 807e45ba9236ae318d25345f79eb3a90906fbd04..9cfb340750b567445054aafd36c8b1c6e81fa309 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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());
 }