From 58a4e1c62f70331eff705412cc316bcc0722838e Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 3 Mar 2006 12:26:58 +0000 Subject: [PATCH] Fix for Bug IPAL11670 CRASH after trying to import "polygones.med" and "recall_bord.med". --- src/SalomeApp/SalomeApp_ExceptionHandler.cxx | 29 ++++---------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index 3791d4d98..63a70256d 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -17,22 +17,15 @@ // See http://www.salome-platform.org/ // #include "SalomeApp_ExceptionHandler.h" +#include "CASCatch_CatchSignals.hxx" #include -#include -#include - #include #include #include -#include -#include -#include - - /*!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 ) { -- 2.39.2