]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Crash on copy operation
authorabd <abd@opencascade.com>
Wed, 22 Nov 2006 11:52:07 +0000 (11:52 +0000)
committerabd <abd@opencascade.com>
Wed, 22 Nov 2006 11:52:07 +0000 (11:52 +0000)
src/VISU_I/VISU_Gen_i.cc

index a278a3a154e5547daaa870c107dbcab0d23d0f81..04a9ca15bc5c8ce858228bbd314a5d055306b6e8 100644 (file)
@@ -86,7 +86,6 @@
 #include <strstream>
 
 #include "Utils_ExceptHandlers.hxx"
-#include "CASCatch.hxx"
 
 #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
 #define NO_CAS_CATCH
@@ -252,23 +251,40 @@ 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;
+       if(theColoredPrs3d->Create(theMeshName,theEntity,theFieldName,int(theIteration)))
+         return true;
 #ifndef _DEXCEPT_
-         }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();          
+# 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
+#endif
     return false;
   }  
 
@@ -1088,7 +1104,7 @@ namespace VISU
       aFileName += aFileInfo.fileName().latin1();
       static QString aCommand;
       string aFullFileName =  aTmpDir + aFileName;
-      aCommand.sprintf(" %s %s",aFileInfo.filePath(), aFullFileName.c_str() );
+      aCommand.sprintf(" %s %s",aFileInfo.filePath().latin1(), aFullFileName.c_str() );
       aCommand = QDir::convertSeparators( aCommand );
       aCommand.prepend( COPY_COMMAND );