]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Join modifications from branch BR_For_OCT_611: migration to OCCT6.1.1 with new except... mergefrom_BR_For_OCT_611_04Sep06
authorjfa <jfa@opencascade.com>
Mon, 4 Sep 2006 11:35:20 +0000 (11:35 +0000)
committerjfa <jfa@opencascade.com>
Mon, 4 Sep 2006 11:35:20 +0000 (11:35 +0000)
src/CONVERTOR/VISU_MedConvertor.cxx
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_TimeAnimation.cxx

index f6e5127c64e11408d282b77a4a53f5869d324091..77c4351bc672620c0e6db9983e9131a193178822 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //  File   : VISU_MedConvertor.cxx
 #include "MED_GaussUtils.hxx"
 #include "MED_Utilities.hxx"
 
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
+#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
+#include <Standard_ErrorHandler.hxx>
+#else
 #include "CASCatch.hxx"
+#endif
 
 #include <vtkCellType.h>
 
@@ -1399,8 +1409,13 @@ VISU_MedConvertor
            INITMSG(MYDEBUG,"- iTimeStamp = "<<iTimeStamp<<endl);
            
 #ifndef _DEXCEPT_
-           CASCatch_TRY{ 
-             try{
+#ifdef NO_CAS_CATCH
+            try{
+              OCC_CATCH_SIGNALS;
+#else
+            CASCatch_TRY{
+              try{
+#endif
 #endif
                MED::PTimeStampInfo aTimeStampInfo = aMed->GetPTimeStampInfo(aFieldInfo,
                                                                             aMEntity,
@@ -1470,15 +1485,26 @@ VISU_MedConvertor
                  }
                }
 #ifndef _DEXCEPT_
+#ifdef NO_CAS_CATCH
+              }catch(Standard_Failure){
+               Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+               MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
              }catch(std::exception& exc){
                MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
              }catch(...){
                MSG(MYDEBUG,"Unknown exception !!!");
              }
-           }CASCatch_CATCH(Standard_Failure){
-             Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
-             MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
-           }
+#else
+             }catch(std::exception& exc){
+               MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+             }catch(...){
+               MSG(MYDEBUG,"Unknown exception !!!");
+             }
+            }CASCatch_CATCH(Standard_Failure){
+              Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+              MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
+            }
+#endif
 #endif
          }
          for(TInt iComp = 0; iComp <= aNbComp; iComp++){
index d973f0eec1589fbce19d877bb09bcb2fd85e1e86..ebac78cbbf98ffc92123a52ec7570ae50b6feada 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //  File   : VISU_Gen_i.cc
 #include <strstream>
 
 #include "Utils_ExceptHandlers.hxx"
+
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
+#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
+#include <Standard_ErrorHandler.hxx>
+#else
 #include "CASCatch.hxx"
+#endif
 
 using namespace std;
 
@@ -240,23 +251,39 @@ namespace VISU
                    const char* theFieldName, 
                    CORBA::Double theIteration)
   {
-    CASCatch_TRY{       
 #ifndef _DEXCEPT_
+#ifdef NO_CAS_CATCH
+    try{
+      OCC_CATCH_SIGNALS;
+#else
+    CASCatch_TRY{
       try{
+#endif
 #endif
        if(theColoredPrs3d->Create(theMeshName,theEntity,theFieldName,int(theIteration)))
          return true;
 #ifndef _DEXCEPT_
+#ifdef NO_CAS_CATCH
+      }catch(Standard_Failure) {
+       Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+       INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
       }catch(std::exception& exc){
        INFOS("Follow exception was occured :\n"<<exc.what());
       }catch(...){
        INFOS("Unknown exception was occured!");
       }
-#endif
-    }CASCatch_CATCH(Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+#else
+      }catch(std::exception& exc){
+       INFOS("Follow exception was occured :\n"<<exc.what());
+      }catch(...){
+       INFOS("Unknown exception was occured!");
+      }
+    }CASCatch_CATCH(Standard_Failure){
+      Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
       INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
     }
+#endif
+#endif
     return false;
   }
 
index b337e3ada5c446474d6bd7cef5ab5a41c5666690..5faacca8d429b41547d7a6cc7a2176acf1cfda6b 100644 (file)
 
 #include "SALOMEDSClient_AttributeComment.hxx"
 #include "SALOMEDSClient_AttributeName.hxx"
-#include "CASCatch.hxx"
 
 #include <qpixmap.h>
 #include <qimage.h>
 #include <qstrlist.h>
 #include <qdir.h>
 
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
+#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
+#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
+
 using namespace std;
 
 
@@ -235,23 +246,39 @@ namespace
       
       bool anIsCreated = false;
       TPrs3d* aPresent = new TPrs3d(theResult, false);
-      CASCatch_TRY{       
-       try{
-         if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
-           anIsCreated = true;
-           theData.myPrs[aFrameId++] = aPresent;
-           aMin = std::min(aPresent->GetMin(), aMin);
-           aMax = std::max(aPresent->GetMax(), aMax);
-         }
-       }catch(std::exception& exc){
-         INFOS("Follow exception was occured :\n"<<exc.what());
-       }catch(...){
-         INFOS("Unknown exception was occured!");
-       }
-      }CASCatch_CATCH(Standard_Failure) {
-       Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-       INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
+#ifdef NO_CAS_CATCH
+      try{       
+        OCC_CATCH_SIGNALS;
+#else
+      CASCatch_TRY{
+        try{
+#endif
+          if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
+            anIsCreated = true;
+            theData.myPrs[aFrameId++] = aPresent;
+            aMin = std::min(aPresent->GetMin(), aMin);
+            aMax = std::max(aPresent->GetMax(), aMax);
+          }
+#ifdef NO_CAS_CATCH
+        }catch(Standard_Failure) {
+          Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+          INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
+        }catch(std::exception& exc){
+          INFOS("Follow exception was occured :\n"<<exc.what());
+        }catch(...){
+          INFOS("Unknown exception was occured!");
+        }
+#else
+        }catch(std::exception& exc){
+          INFOS("Follow exception was occured :\n"<<exc.what());
+        }catch(...){
+          INFOS("Unknown exception was occured!");
+        }
+      }CASCatch_CATCH(Standard_Failure){
+        Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+        INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
       }
+#endif
       if(!anIsCreated)
        aPresent->_remove_ref();
     }