X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSalomeApp%2FSalomeApp_ExceptionHandler.cxx;h=e9fa0f9af56aefd46718198ba665a99deda68b60;hb=7d93c764f1cd3fbbe7db561b2e4b0bafa10bc0d4;hp=4534dcf6bd5da930cbc2b0320635be9d40c7a6b5;hpb=d6bd12111347879cd8dbe1a15ac4d6ba32ce0d6b;p=modules%2Fgui.git diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index 4534dcf6b..e9fa0f9af 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -23,8 +23,6 @@ #include "SalomeApp_ExceptionHandler.h" #include "Utils_CorbaException.hxx" -#include "CASCatch.hxx" - #include #include @@ -53,16 +51,19 @@ SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal ) /*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/ bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e ) { - try { + bool result = true; + + try + { OCC_CATCH_SIGNALS; - SUIT_ExceptionHandler::internalHandle( o, e ); + result = SUIT_ExceptionHandler::internalHandle( o, e ); } - catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - throw Standard_Failure( aFail->GetMessageString() ); + catch( Standard_Failure& e ) + { + throw Standard_Failure( e.GetMessageString() ); } - return true; + return result; } /*!Try to call handleSignals( o, e ), catch and show error message.*/