]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for Bug IPAL11670
authorapo <apo@opencascade.com>
Fri, 3 Mar 2006 12:26:58 +0000 (12:26 +0000)
committerapo <apo@opencascade.com>
Fri, 3 Mar 2006 12:26:58 +0000 (12:26 +0000)
   CRASH after trying to import "polygones.med" and "recall_bord.med".

src/SalomeApp/SalomeApp_ExceptionHandler.cxx

index 3791d4d9897fd59f0c0a71102063e9ddcdd6681d..63a70256ded91a01cac3cc0c14d4c1d484d551dc 100644 (file)
 // See http://www.salome-platform.org/
 //
 #include "SalomeApp_ExceptionHandler.h"
+#include "CASCatch_CatchSignals.hxx"
 
 #include <OSD.hxx>
 
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
 #include <stdexcept>
 #include <exception>
 
 #include <qstring.h>
 
-#include <CASCatch_CatchSignals.hxx>
-#include <CASCatch_ErrorHandler.hxx>
-#include <CASCatch_Failure.hxx> 
-
-
 /*!Constructor. Initialize by \a floatSignal.*/
 SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
 : SUIT_ExceptionHandler()
@@ -45,30 +38,18 @@ bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
 {
 
   CASCatch_CatchSignals aCatchSignals;
-  aCatchSignals.Activate();
-    
-    
+
   CASCatch_TRY {   
     SUIT_ExceptionHandler::internalHandle( o, e );
   }
-  CASCatch_CATCH(CASCatch_Failure) {
-    aCatchSignals.Deactivate();
-    Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();          
-    throw std::runtime_error( aFail->GetError() );
+  CASCatch_CATCH(Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+    throw Standard_Failure( aFail->GetMessageString() );
   }
   
-  aCatchSignals.Deactivate();   
   return true;
 }
 
-#ifdef try
-#undef try
-#endif
-
-#ifdef catch
-#undef catch
-#endif
-
 /*!Try to call handleSignals( o, e ), catch and show error message.*/
 bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e )
 {