-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "SalomeApp_ExceptionHandler.h"
#include "Utils_CorbaException.hxx"
-#include "CASCatch.hxx"
-
#include <OSD.hxx>
#include <stdexcept>
/*!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.*/
}
/*!Create new SUIT_ExceptionHandler*/
-extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
+extern "C" SALOMEAPPIMPL_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
{
// MSV 2006-04-26: work around PAL12004 "VTK window => SIGFPE Arithmetic Exception Detected"
// We disable FPE signal as it was in earlier versions of SALOME. It is enabled